summaryrefslogtreecommitdiff
path: root/db/migrations/0301_melted_vargas.sql
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrations/0301_melted_vargas.sql')
-rw-r--r--db/migrations/0301_melted_vargas.sql14
1 files changed, 14 insertions, 0 deletions
diff --git a/db/migrations/0301_melted_vargas.sql b/db/migrations/0301_melted_vargas.sql
new file mode 100644
index 00000000..ad42b8a6
--- /dev/null
+++ b/db/migrations/0301_melted_vargas.sql
@@ -0,0 +1,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"; \ No newline at end of file