Update migration version for download enabled
authorChocobozzz <me@florianbigard.com>
Mon, 11 Feb 2019 10:55:11 +0000 (11:55 +0100)
committerChocobozzz <me@florianbigard.com>
Mon, 11 Feb 2019 10:55:11 +0000 (11:55 +0100)
server/initializers/constants.ts
server/initializers/migrations/0280-video-downloading-enabled.ts [deleted file]
server/initializers/migrations/0335-video-downloading-enabled.ts [new file with mode: 0644]

index e5c4c4e639866349294711ffafac289091bf2254..639493d737333da20cef47b0c9a9602aefe63b0e 100644 (file)
@@ -16,7 +16,7 @@ let config: IConfig = require('config')
 
 // ---------------------------------------------------------------------------
 
-const LAST_MIGRATION_VERSION = 330
+const LAST_MIGRATION_VERSION = 335
 
 // ---------------------------------------------------------------------------
 
diff --git a/server/initializers/migrations/0280-video-downloading-enabled.ts b/server/initializers/migrations/0280-video-downloading-enabled.ts
deleted file mode 100644 (file)
index e794664..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-import * as Sequelize from 'sequelize'
-import { Migration } from '../../models/migrations'
-
-async function up (utils: {
-  transaction: Sequelize.Transaction,
-  queryInterface: Sequelize.QueryInterface,
-  sequelize: Sequelize.Sequelize
-}): Promise<void> {
-  const data = {
-    type: Sequelize.BOOLEAN,
-    allowNull: false,
-    defaultValue: true
-  } as Migration.Boolean
-  await utils.queryInterface.addColumn('video', 'downloadEnabled', data)
-
-  data.defaultValue = null
-  return utils.queryInterface.changeColumn('video', 'downloadEnabled', data)
-}
-
-function down (options) {
-  throw new Error('Not implemented.')
-}
-
-export {
-  up,
-  down
-}
diff --git a/server/initializers/migrations/0335-video-downloading-enabled.ts b/server/initializers/migrations/0335-video-downloading-enabled.ts
new file mode 100644 (file)
index 0000000..e794664
--- /dev/null
@@ -0,0 +1,27 @@
+import * as Sequelize from 'sequelize'
+import { Migration } from '../../models/migrations'
+
+async function up (utils: {
+  transaction: Sequelize.Transaction,
+  queryInterface: Sequelize.QueryInterface,
+  sequelize: Sequelize.Sequelize
+}): Promise<void> {
+  const data = {
+    type: Sequelize.BOOLEAN,
+    allowNull: false,
+    defaultValue: true
+  } as Migration.Boolean
+  await utils.queryInterface.addColumn('video', 'downloadEnabled', data)
+
+  data.defaultValue = null
+  return utils.queryInterface.changeColumn('video', 'downloadEnabled', data)
+}
+
+function down (options) {
+  throw new Error('Not implemented.')
+}
+
+export {
+  up,
+  down
+}