diff options
| author | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-07-01 11:48:43 +0000 |
|---|---|---|
| committer | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-07-01 11:48:43 +0000 |
| commit | cee824301521c181000d501c0236db99079bbae4 (patch) | |
| tree | b2197aa802c317c76670feb2af399838bac0365c /db/migrations/0181_easy_blazing_skull.sql | |
| parent | 4c15b99d9586aa48693213c78c02fba4639ebb85 (diff) | |
(최겸) 인포메이선 db 수정 및 공지사항 db 추가
Diffstat (limited to 'db/migrations/0181_easy_blazing_skull.sql')
| -rw-r--r-- | db/migrations/0181_easy_blazing_skull.sql | 19 |
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 |
