summaryrefslogtreecommitdiff
path: root/db/migrations/0181_easy_blazing_skull.sql
diff options
context:
space:
mode:
authorjoonhoekim <26rote@gmail.com>2025-07-02 00:17:29 +0000
committerjoonhoekim <26rote@gmail.com>2025-07-02 00:17:29 +0000
commit6a9ca20deddcdcbe8495cf5a73ec7ea5f53f9b55 (patch)
treef48f3a84174f0be560fdf5ed7797fffd8a412a91 /db/migrations/0181_easy_blazing_skull.sql
parent4fb273b7fc85352183113f1240fc33f7d6c98328 (diff)
parentcee824301521c181000d501c0236db99079bbae4 (diff)
(merge) merged local commits
Diffstat (limited to 'db/migrations/0181_easy_blazing_skull.sql')
-rw-r--r--db/migrations/0181_easy_blazing_skull.sql19
1 files changed, 19 insertions, 0 deletions
diff --git a/db/migrations/0181_easy_blazing_skull.sql b/db/migrations/0181_easy_blazing_skull.sql
new file mode 100644
index 00000000..9f5c0639
--- /dev/null
+++ b/db/migrations/0181_easy_blazing_skull.sql
@@ -0,0 +1,19 @@
+CREATE TABLE "notice" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "page_path" varchar(100) NOT NULL,
+ "title" varchar(500) NOT NULL,
+ "content" text NOT NULL,
+ "author_id" integer NOT NULL,
+ "is_active" boolean DEFAULT true NOT NULL,
+ "created_at" timestamp DEFAULT now() NOT NULL,
+ "updated_at" timestamp DEFAULT now() NOT NULL
+);
+--> statement-breakpoint
+ALTER TABLE "page_information" RENAME COLUMN "page_code" TO "page_path";--> statement-breakpoint
+ALTER TABLE "page_information" RENAME COLUMN "description" TO "information_content";--> statement-breakpoint
+ALTER TABLE "page_information" DROP CONSTRAINT "page_information_page_code_unique";--> statement-breakpoint
+ALTER TABLE "notice" ADD CONSTRAINT "notice_author_id_users_id_fk" FOREIGN KEY ("author_id") REFERENCES "public"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "page_information" DROP COLUMN "title";--> statement-breakpoint
+ALTER TABLE "page_information" DROP COLUMN "notice_title";--> statement-breakpoint
+ALTER TABLE "page_information" DROP COLUMN "notice_content";--> statement-breakpoint
+ALTER TABLE "page_information" ADD CONSTRAINT "page_information_page_path_unique" UNIQUE("page_path"); \ No newline at end of file