core/server/data/migrations/utils/tables.js
/**
 * Creates migration which will drop a table
 *
 * @param {[string]} names  - names of the tables to drop
 */
Creates migration which will drop a table
@param {[string]} names  - names of the tables to drop
Creates migration which will drop a table @param { [ string ] } names - names of the tables to drop
function dropTables(names) {
    return createIrreversibleMigration(
        async function up(connection) {
            for (const name of names) {
                const exists = await connection.schema.hasTable(name);
                if (!exists) {
                    logging.warn(`Skipping dropping table: ${name} - table does not exist`);
                } else {
                    logging.info(`Dropping table: ${name}`);
                    await commands.deleteTable(name, connection);
                }
            }
        }
    );
}
function dropTables ( names ) { return createIrreversibleMigration ( async function up ( connection ) { for ( const name of names ) { const exists = await connection . schema . hasTable ( name ) ; if ( ! exists ) { logging . warn ( ` ${ name } ` ) ; } else { logging . info ( ` ${ name } ` ) ; await commands . deleteTable ( name , connection ) ; } } } ) ; }
Creates migration which will drop a table
 @param {[string]} names  - names of the tables to drop
Creates migration which will drop a table @param { [ string ] } names - names of the tables to drop