diff options
Diffstat (limited to 'server/initializers/migrations/0015-video-views.ts')
-rw-r--r-- | server/initializers/migrations/0015-video-views.ts | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/server/initializers/migrations/0015-video-views.ts b/server/initializers/migrations/0015-video-views.ts index e70869404..df274d817 100644 --- a/server/initializers/migrations/0015-video-views.ts +++ b/server/initializers/migrations/0015-video-views.ts | |||
@@ -1,7 +1,12 @@ | |||
1 | // utils = { transaction, queryInterface, sequelize, Sequelize } | 1 | import * as Sequelize from 'sequelize' |
2 | function up (utils, finalCallback) { | 2 | import * as Promise from 'bluebird' |
3 | |||
4 | function up (utils: { | ||
5 | transaction: Sequelize.Transaction, | ||
6 | queryInterface: Sequelize.QueryInterface, | ||
7 | sequelize: Sequelize.Sequelize | ||
8 | }): Promise<void> { | ||
3 | const q = utils.queryInterface | 9 | const q = utils.queryInterface |
4 | const Sequelize = utils.Sequelize | ||
5 | 10 | ||
6 | const data = { | 11 | const data = { |
7 | type: Sequelize.INTEGER, | 12 | type: Sequelize.INTEGER, |
@@ -9,7 +14,7 @@ function up (utils, finalCallback) { | |||
9 | defaultValue: 0 | 14 | defaultValue: 0 |
10 | } | 15 | } |
11 | 16 | ||
12 | q.addColumn('Videos', 'views', data, { transaction: utils.transaction }).asCallback(finalCallback) | 17 | return q.addColumn('Videos', 'views', data) |
13 | } | 18 | } |
14 | 19 | ||
15 | function down (options, callback) { | 20 | function down (options, callback) { |