diff options
Diffstat (limited to 'server/initializers/migrations/0150-avatar-cascade.ts')
-rw-r--r-- | server/initializers/migrations/0150-avatar-cascade.ts | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/server/initializers/migrations/0150-avatar-cascade.ts b/server/initializers/migrations/0150-avatar-cascade.ts deleted file mode 100644 index ecf3467a0..000000000 --- a/server/initializers/migrations/0150-avatar-cascade.ts +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | import * as Sequelize from 'sequelize' | ||
2 | |||
3 | async function up (utils: { | ||
4 | transaction: Sequelize.Transaction | ||
5 | queryInterface: Sequelize.QueryInterface | ||
6 | sequelize: Sequelize.Sequelize | ||
7 | }): Promise<void> { | ||
8 | await utils.queryInterface.removeConstraint('actor', 'actor_avatarId_fkey') | ||
9 | |||
10 | await utils.queryInterface.addConstraint('actor', { | ||
11 | fields: [ 'avatarId' ], | ||
12 | type: 'foreign key', | ||
13 | references: { | ||
14 | table: 'avatar', | ||
15 | field: 'id' | ||
16 | }, | ||
17 | onDelete: 'set null', | ||
18 | onUpdate: 'CASCADE' | ||
19 | }) | ||
20 | } | ||
21 | |||
22 | function down (options) { | ||
23 | throw new Error('Not implemented.') | ||
24 | } | ||
25 | |||
26 | export { | ||
27 | up, | ||
28 | down | ||
29 | } | ||