Skip to content

Commit 5080606

Browse files
committed
fix migration script
1 parent fee0deb commit 5080606

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/shared-db/migrations/0015_ambiguous_the_watchers.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
ALTER TABLE "moderation_history" RENAME COLUMN "tweet_id" TO "submission_id";--> statement-breakpoint
22
ALTER TABLE "moderation_history" RENAME COLUMN "admin_id" TO "moderator_account_id";--> statement-breakpoint
3-
ALTER TABLE "moderation_history" DROP CONSTRAINT "moderation_history_tweet_id_submissions_tweet_id_fk";
3+
ALTER TABLE "moderation_history" DROP CONSTRAINT IF EXISTS "moderation_history_tweet_id_submissions_tweet_id_fk";
44
--> statement-breakpoint
5-
DROP INDEX "moderation_history_tweet_idx";--> statement-breakpoint
6-
DROP INDEX "moderation_history_admin_idx";--> statement-breakpoint
5+
DROP INDEX IF EXISTS "moderation_history_tweet_idx";--> statement-breakpoint
6+
DROP INDEX IF EXISTS "moderation_history_admin_idx";--> statement-breakpoint
77
ALTER TABLE "moderation_history" ADD COLUMN "moderator_account_id_type" text;--> statement-breakpoint
88
ALTER TABLE "moderation_history" ADD COLUMN "source" text;--> statement-breakpoint
99

0 commit comments

Comments
 (0)