Sync LMS backend source

This commit is contained in:
2026-07-07 16:09:12 +09:00
commit 5a2ecd0fea
126 changed files with 22959 additions and 0 deletions
@@ -0,0 +1,28 @@
CREATE TABLE "studio_repositories" (
"id" UUID NOT NULL DEFAULT gen_random_uuid(),
"user_id" UUID NOT NULL,
"week_id" UUID NOT NULL,
"module_id" UUID NOT NULL,
"repo_owner" TEXT NOT NULL,
"repo_name" TEXT NOT NULL,
"repository_url" TEXT NOT NULL,
"template_repository_url" TEXT NOT NULL,
"created_at" TIMESTAMPTZ(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updated_at" TIMESTAMPTZ(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "studio_repositories_pkey" PRIMARY KEY ("id")
);
CREATE UNIQUE INDEX "studio_repositories_user_id_module_id_key" ON "studio_repositories"("user_id", "module_id");
CREATE INDEX "studio_repositories_week_id_idx" ON "studio_repositories"("week_id");
CREATE INDEX "studio_repositories_repo_owner_repo_name_idx" ON "studio_repositories"("repo_owner", "repo_name");
ALTER TABLE "studio_repositories"
ADD CONSTRAINT "studio_repositories_user_id_fkey"
FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE "studio_repositories"
ADD CONSTRAINT "studio_repositories_module_id_fkey"
FOREIGN KEY ("module_id") REFERENCES "course_week_modules"("id") ON DELETE CASCADE ON UPDATE CASCADE;
COMMENT ON TABLE "studio_repositories" IS '개발 스튜디오 사용자별 모듈 Git 저장소 매핑.';