mirror of
https://github.com/felipegcoutinho/openmonetis.git
synced 2026-07-09 03:16:01 +00:00
feat(anotações): permite anexos em notas
This commit is contained in:
9
drizzle/0031_lame_cerise.sql
Normal file
9
drizzle/0031_lame_cerise.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
CREATE TABLE "anotacao_anexos" (
|
||||
"anotacao_id" uuid NOT NULL,
|
||||
"anexo_id" uuid NOT NULL,
|
||||
CONSTRAINT "anotacao_anexos_anotacao_id_anexo_id_pk" PRIMARY KEY("anotacao_id","anexo_id")
|
||||
);
|
||||
--> statement-breakpoint
|
||||
ALTER TABLE "anotacao_anexos" ADD CONSTRAINT "anotacao_anexos_anotacao_id_anotacoes_id_fk" FOREIGN KEY ("anotacao_id") REFERENCES "public"."anotacoes"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
||||
ALTER TABLE "anotacao_anexos" ADD CONSTRAINT "anotacao_anexos_anexo_id_anexos_id_fk" FOREIGN KEY ("anexo_id") REFERENCES "public"."anexos"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
||||
CREATE INDEX "anotacao_anexos_anexo_id_idx" ON "anotacao_anexos" USING btree ("anexo_id");
|
||||
Reference in New Issue
Block a user