feat: 연감 기능 추가 및 데이터베이스 모델 생성

This commit is contained in:
2026-01-28 16:18:14 +00:00
parent 321aa8f5c1
commit 8c5ab5074d
7 changed files with 525 additions and 1 deletions
@@ -0,0 +1,13 @@
CREATE TABLE "yearbook_history" (
"id" SERIAL PRIMARY KEY,
"profile_name" TEXT NOT NULL,
"year" INTEGER NOT NULL,
"month" INTEGER NOT NULL,
"map" JSONB NOT NULL,
"nations" JSONB NOT NULL,
"hash" TEXT NOT NULL DEFAULT '',
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP
);
CREATE UNIQUE INDEX "yearbook_history_profile_year_month_key" ON "yearbook_history"("profile_name", "year", "month");
CREATE INDEX "yearbook_history_profile_year_month_idx" ON "yearbook_history"("profile_name", "year", "month");