diff options
Diffstat (limited to 'server/initializers/migrations')
-rw-r--r-- | server/initializers/migrations/0055-video-uuid.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/initializers/migrations/0055-video-uuid.ts b/server/initializers/migrations/0055-video-uuid.ts index 6db25f193..e0f904080 100644 --- a/server/initializers/migrations/0055-video-uuid.ts +++ b/server/initializers/migrations/0055-video-uuid.ts | |||
@@ -1,5 +1,6 @@ | |||
1 | import * as Sequelize from 'sequelize' | 1 | import * as Sequelize from 'sequelize' |
2 | import * as Promise from 'bluebird' | 2 | import * as Promise from 'bluebird' |
3 | import { Migration } from '../../models/migrations' | ||
3 | 4 | ||
4 | function up (utils: { | 5 | function up (utils: { |
5 | transaction: Sequelize.Transaction, | 6 | transaction: Sequelize.Transaction, |
@@ -12,7 +13,7 @@ function up (utils: { | |||
12 | type: Sequelize.UUID, | 13 | type: Sequelize.UUID, |
13 | defaultValue: Sequelize.UUIDV4, | 14 | defaultValue: Sequelize.UUIDV4, |
14 | allowNull: true | 15 | allowNull: true |
15 | } | 16 | } as Migration.UUID |
16 | 17 | ||
17 | return q.addColumn('Videos', 'uuid', dataUUID) | 18 | return q.addColumn('Videos', 'uuid', dataUUID) |
18 | .then(() => { | 19 | .then(() => { |
@@ -24,7 +25,7 @@ function up (utils: { | |||
24 | return utils.sequelize.query(query) | 25 | return utils.sequelize.query(query) |
25 | }) | 26 | }) |
26 | .then(() => { | 27 | .then(() => { |
27 | dataUUID.defaultValue = null // FIXME:default value cannot be null if string | 28 | dataUUID.defaultValue = null |
28 | 29 | ||
29 | return q.changeColumn('Videos', 'uuid', dataUUID) | 30 | return q.changeColumn('Videos', 'uuid', dataUUID) |
30 | }) | 31 | }) |