feat: sending money / coins
This commit is contained in:
parent
4e58d20e84
commit
de0987a007
14 changed files with 2825 additions and 325 deletions
15
website/drizzle/0001_yummy_meggan.sql
Normal file
15
website/drizzle/0001_yummy_meggan.sql
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
ALTER TYPE "transaction_type" ADD VALUE 'TRANSFER_IN';--> statement-breakpoint
|
||||
ALTER TYPE "transaction_type" ADD VALUE 'TRANSFER_OUT';--> statement-breakpoint
|
||||
ALTER TABLE "transaction" ADD COLUMN "recipient_user_id" integer;--> statement-breakpoint
|
||||
ALTER TABLE "transaction" ADD COLUMN "sender_user_id" integer;--> 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 no action 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 no action ON UPDATE no action;
|
||||
EXCEPTION
|
||||
WHEN duplicate_object THEN null;
|
||||
END $$;
|
||||
1559
website/drizzle/meta/0001_snapshot.json
Normal file
1559
website/drizzle/meta/0001_snapshot.json
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -8,6 +8,13 @@
|
|||
"when": 1748604150899,
|
||||
"tag": "0000_spooky_umar",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 1,
|
||||
"version": "7",
|
||||
"when": 1748690470287,
|
||||
"tag": "0001_yummy_meggan",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in a new issue