aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-04-20 11:20:12 +0200
committerRigel Kent <par@rigelk.eu>2020-05-01 16:41:02 +0200
commit0251197e249cc03b65805ed6805da72bf4573529 (patch)
tree3aae202fd1ea24bac5cd7f2c380ffe50aae189a0 /server/initializers
parentb8cf27c0f86d205a279d03b83e0e6728f46da67f (diff)
downloadPeerTube-0251197e249cc03b65805ed6805da72bf4573529.tar.gz
PeerTube-0251197e249cc03b65805ed6805da72bf4573529.tar.zst
PeerTube-0251197e249cc03b65805ed6805da72bf4573529.zip
Factorize rest-table and fix/simplify SQL
Diffstat (limited to 'server/initializers')
-rw-r--r--server/initializers/migrations/0490-abuse-video.ts4
1 files changed, 1 insertions, 3 deletions
diff --git a/server/initializers/migrations/0490-abuse-video.ts b/server/initializers/migrations/0490-abuse-video.ts
index 26333feb5..610307aa4 100644
--- a/server/initializers/migrations/0490-abuse-video.ts
+++ b/server/initializers/migrations/0490-abuse-video.ts
@@ -11,10 +11,8 @@ async function up (utils: {
11 allowNull: true 11 allowNull: true
12 } 12 }
13 await utils.queryInterface.addColumn('videoAbuse', 'deletedVideo', deletedVideo) 13 await utils.queryInterface.addColumn('videoAbuse', 'deletedVideo', deletedVideo)
14 await utils.sequelize.query(`ALTER TABLE "videoAbsue" ALTER COLUMN "videoId" DROP NOT NULL;`) 14 await utils.sequelize.query(`ALTER TABLE "videoAbuse" ALTER COLUMN "videoId" DROP NOT NULL;`)
15 await utils.sequelize.query(`ALTER TABLE "videoAbuse" DROP CONSTRAINT IF EXISTS "videoAbuse_videoId_fkey";`) 15 await utils.sequelize.query(`ALTER TABLE "videoAbuse" DROP CONSTRAINT IF EXISTS "videoAbuse_videoId_fkey";`)
16 await utils.sequelize.query(`ALTER TABLE "videoAbuse" ADD CONSTRAINT "videoAbuse_videoId_fkey"
17 FOREIGN KEY ("videoId") REFERENCES video(id) ON UPDATE CASCADE ON DELETE SET NULL;`)
18 16
19} 17}
20 18