You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Runs migrations which haven't been applied yet. A list of migrations which have been applied is stored in a table in the database itself. Read more about this [here](https://github.com/jbranchaud/til/blob/master/drizzle/drizzle-tracks-migrations-in-a-log-table.md).
This command **does not** generate migrations! Make sure to generate migrations for any major changes to ensure that the history of the database schema is always preserved.
ALTERTABLE"cf_user_stats" ADD CONSTRAINT"cf_user_stats_user_id_users_id_fk"FOREIGN KEY ("user_id") REFERENCES"public"."users"("id") ON DELETE no action ONUPDATE no action;--> statement-breakpoint
86
91
ALTERTABLE"potd" ADD CONSTRAINT"potd_problem_id_problems_id_fk"FOREIGN KEY ("problem_id") REFERENCES"public"."problems"("id") ON DELETE no action ONUPDATE no action;--> statement-breakpoint
87
92
ALTERTABLE"potd_solves" ADD CONSTRAINT"potd_solves_potd_id_potd_id_fk"FOREIGN KEY ("potd_id") REFERENCES"public"."potd"("id") ON DELETE no action ONUPDATE no action;--> statement-breakpoint
@@ -92,9 +97,4 @@ ALTER TABLE "submissions" ADD CONSTRAINT "submissions_problem_id_problems_id_fk"
92
97
ALTERTABLE"user_contests" ADD CONSTRAINT"user_contests_user_id_users_id_fk"FOREIGN KEY ("user_id") REFERENCES"public"."users"("id") ON DELETE no action ONUPDATE no action;--> statement-breakpoint
93
98
ALTERTABLE"user_contests" ADD CONSTRAINT"user_contests_contest_id_contests_external_id_fk"FOREIGN KEY ("contest_id") REFERENCES"public"."contests"("external_id") ON DELETE no action ONUPDATE no action;--> statement-breakpoint
94
99
CREATEUNIQUE INDEX "problems_contest_index" ON"problems" USING btree ("contest_id","index");--> statement-breakpoint
95
-
ALTER TABLE "users" ADD CONSTRAINT "users_email_unique" UNIQUE("email");--> statement-breakpoint
96
-
ALTER TABLE "users" ADD CONSTRAINT "users_cf_handle_unique" UNIQUE("cf_handle");--> statement-breakpoint
97
-
ALTER TABLE "users" ADD CONSTRAINT "users_codechef_handle_unique" UNIQUE("codechef_handle");--> statement-breakpoint
98
-
ALTER TABLE "users" ADD CONSTRAINT "users_atcoder_handle_unique" UNIQUE("atcoder_handle");--> statement-breakpoint
99
-
ALTER TABLE "users" ADD CONSTRAINT "users_leetcode_handle_unique" UNIQUE("leetcode_handle");
100
-
*/
100
+
CREATEUNIQUE INDEX "user_contest_unique" ON"user_contests" USING btree ("user_id","contest_id");
0 commit comments