From 0251197e249cc03b65805ed6805da72bf4573529 Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Mon, 20 Apr 2020 11:20:12 +0200 Subject: Factorize rest-table and fix/simplify SQL --- server/initializers/migrations/0490-abuse-video.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'server/initializers/migrations') 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: { allowNull: true } await utils.queryInterface.addColumn('videoAbuse', 'deletedVideo', deletedVideo) - await utils.sequelize.query(`ALTER TABLE "videoAbsue" ALTER COLUMN "videoId" DROP NOT NULL;`) + await utils.sequelize.query(`ALTER TABLE "videoAbuse" ALTER COLUMN "videoId" DROP NOT NULL;`) await utils.sequelize.query(`ALTER TABLE "videoAbuse" DROP CONSTRAINT IF EXISTS "videoAbuse_videoId_fkey";`) - await utils.sequelize.query(`ALTER TABLE "videoAbuse" ADD CONSTRAINT "videoAbuse_videoId_fkey" - FOREIGN KEY ("videoId") REFERENCES video(id) ON UPDATE CASCADE ON DELETE SET NULL;`) } -- cgit v1.2.3