Add migration to delete old Authors table
authorChocobozzz <me@florianbigard.com>
Fri, 29 Dec 2017 08:42:57 +0000 (09:42 +0100)
committerChocobozzz <me@florianbigard.com>
Fri, 29 Dec 2017 08:42:57 +0000 (09:42 +0100)
server/initializers/constants.ts
server/initializers/migrations/0145-delete-author.ts [new file with mode: 0644]

index 25b2dff8442efaa92b94f7f96196a4dc96ede7c2..3a5a557d4c001a9afc0b43c1b1b2c0389d1ab57f 100644 (file)
@@ -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 (file)
index 0000000..cb23d1c
--- /dev/null
@@ -0,0 +1,18 @@
+import * as Sequelize from 'sequelize'
+
+async function up (utils: {
+  transaction: Sequelize.Transaction,
+  queryInterface: Sequelize.QueryInterface,
+  sequelize: Sequelize.Sequelize
+}): Promise<void> {
+  await utils.queryInterface.dropTable('Authors')
+}
+
+function down (options) {
+  throw new Error('Not implemented.')
+}
+
+export {
+  up,
+  down
+}