]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/initializers/migrations/0520-abuses-split.ts
Specify runner name when unregistering the runner
[github/Chocobozzz/PeerTube.git] / server / initializers / migrations / 0520-abuses-split.ts
index 5898d501f417d11755acd7836b951ae8550d42fc..136d5c2b2d5921d4e6135d69731b4213c4099d57 100644 (file)
@@ -43,12 +43,10 @@ async function up (utils: {
   await utils.sequelize.query(`
     CREATE TABLE IF NOT EXISTS "commentAbuse" (
       "id" serial,
-      "deletedComment" jsonb DEFAULT NULL,
       "abuseId" integer NOT NULL REFERENCES "abuse" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
       "videoCommentId" integer REFERENCES "videoComment" ("id") ON DELETE SET NULL ON UPDATE CASCADE,
       "createdAt" timestamp WITH time zone NOT NULL,
       "updatedAt" timestamp WITH time zone NOT NULL,
-      "commentId" integer REFERENCES "videoComment" ("id") ON DELETE SET NULL ON UPDATE CASCADE,
       PRIMARY KEY ("id")
     );
   `)
@@ -67,13 +65,6 @@ async function up (utils: {
 
   await utils.sequelize.query('DROP INDEX IF EXISTS user_notification_video_abuse_id')
   await utils.queryInterface.renameColumn('userNotification', 'videoAbuseId', 'abuseId')
-  await utils.sequelize.query(
-    'ALTER TABLE "userNotification" RENAME CONSTRAINT "userNotification_videoAbuseId_fkey" TO "userNotification_abuseId_fkey"'
-  )
-
-  await utils.sequelize.query(
-    'ALTER TABLE "abuse" RENAME CONSTRAINT "videoAbuse_reporterAccountId_fkey" TO "abuse_reporterAccountId_fkey"'
-  )
 
   await utils.sequelize.query(
     'ALTER INDEX IF EXISTS "videoAbuse_pkey" RENAME TO "abuse_pkey"'