force uppercase usernames
This commit is contained in:
parent
ccd4126953
commit
82d8e34560
6 changed files with 1595 additions and 5 deletions
16
website/drizzle/0002_lush_guardian.sql
Normal file
16
website/drizzle/0002_lush_guardian.sql
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
ALTER TABLE "transaction" DROP CONSTRAINT "transaction_recipient_user_id_user_id_fk";
|
||||
--> statement-breakpoint
|
||||
ALTER TABLE "transaction" DROP CONSTRAINT "transaction_sender_user_id_user_id_fk";
|
||||
--> statement-breakpoint
|
||||
ALTER TABLE "coin" ALTER COLUMN "change_24h" SET DATA TYPE numeric(30, 4);--> statement-breakpoint
|
||||
DO $$ BEGIN
|
||||
ALTER TABLE "transaction" ADD CONSTRAINT "transaction_recipient_user_id_user_id_fk" FOREIGN KEY ("recipient_user_id") REFERENCES "public"."user"("id") ON DELETE set null ON UPDATE no action;
|
||||
EXCEPTION
|
||||
WHEN duplicate_object THEN null;
|
||||
END $$;
|
||||
--> statement-breakpoint
|
||||
DO $$ BEGIN
|
||||
ALTER TABLE "transaction" ADD CONSTRAINT "transaction_sender_user_id_user_id_fk" FOREIGN KEY ("sender_user_id") REFERENCES "public"."user"("id") ON DELETE set null ON UPDATE no action;
|
||||
EXCEPTION
|
||||
WHEN duplicate_object THEN null;
|
||||
END $$;
|
||||
Reference in a new issue