diff options
Diffstat (limited to 'db/migrations/0367_foamy_wolfsbane.sql')
| -rw-r--r-- | db/migrations/0367_foamy_wolfsbane.sql | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/db/migrations/0367_foamy_wolfsbane.sql b/db/migrations/0367_foamy_wolfsbane.sql new file mode 100644 index 00000000..8b055375 --- /dev/null +++ b/db/migrations/0367_foamy_wolfsbane.sql @@ -0,0 +1,17 @@ +CREATE TABLE "pcr_pr_attachment" ( + "id" serial PRIMARY KEY NOT NULL, + "pcr_pr_id" integer NOT NULL, + "type" varchar(20) NOT NULL, + "file_name" varchar(255) NOT NULL, + "file_path" text NOT NULL, + "file_size" integer, + "mime_type" varchar(100), + "created_by" integer, + "created_at" timestamp DEFAULT now() NOT NULL, + "updated_by" integer, + "updated_at" timestamp DEFAULT now() NOT NULL +); +--> statement-breakpoint +ALTER TABLE "pcr_pr_attachment" ADD CONSTRAINT "pcr_pr_attachment_pcr_pr_id_pcr_pr_id_fk" FOREIGN KEY ("pcr_pr_id") REFERENCES "public"."pcr_pr"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "pcr_pr_attachment" ADD CONSTRAINT "pcr_pr_attachment_created_by_users_id_fk" FOREIGN KEY ("created_by") REFERENCES "public"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "pcr_pr_attachment" ADD CONSTRAINT "pcr_pr_attachment_updated_by_users_id_fk" FOREIGN KEY ("updated_by") REFERENCES "public"."users"("id") ON DELETE no action ON UPDATE no action;
\ No newline at end of file |
