From efed5d5ef61cd14ee3f9ed1dda8ea8e937370405 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 29 Dec 2017 09:42:57 +0100 Subject: [PATCH] Add migration to delete old Authors table --- server/initializers/constants.ts | 2 +- .../migrations/0145-delete-author.ts | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 server/initializers/migrations/0145-delete-author.ts diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 25b2dff84..3a5a557d4 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts @@ -9,7 +9,7 @@ import { isTestInstance, root, sanitizeHost, sanitizeUrl } from '../helpers/core // --------------------------------------------------------------------------- -const LAST_MIGRATION_VERSION = 140 +const LAST_MIGRATION_VERSION = 145 // --------------------------------------------------------------------------- diff --git a/server/initializers/migrations/0145-delete-author.ts b/server/initializers/migrations/0145-delete-author.ts new file mode 100644 index 000000000..cb23d1cc2 --- /dev/null +++ b/server/initializers/migrations/0145-delete-author.ts @@ -0,0 +1,18 @@ +import * as Sequelize from 'sequelize' + +async function up (utils: { + transaction: Sequelize.Transaction, + queryInterface: Sequelize.QueryInterface, + sequelize: Sequelize.Sequelize +}): Promise { + await utils.queryInterface.dropTable('Authors') +} + +function down (options) { + throw new Error('Not implemented.') +} + +export { + up, + down +} -- 2.25.1