blob: ad42b8a61af1c11838f436a59652b893f51b75b9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
CREATE TABLE "information_attachments" (
"id" serial PRIMARY KEY NOT NULL,
"information_id" integer NOT NULL,
"file_name" varchar(255) NOT NULL,
"file_path" varchar(1024) NOT NULL,
"file_size" varchar(50) NOT NULL,
"created_at" timestamp DEFAULT now() NOT NULL,
"updated_at" timestamp DEFAULT now() NOT NULL
);
--> statement-breakpoint
ALTER TABLE "information_attachments" ADD CONSTRAINT "information_attachments_information_id_page_information_id_fk" FOREIGN KEY ("information_id") REFERENCES "public"."page_information"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "page_information" DROP COLUMN "attachment_file_name";--> statement-breakpoint
ALTER TABLE "page_information" DROP COLUMN "attachment_file_path";--> statement-breakpoint
ALTER TABLE "page_information" DROP COLUMN "attachment_file_size";
|