feat: enable hybrid local and remote module execution
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
ALTER TABLE "instructor_curriculum_week_overrides"
|
||||
ADD COLUMN "is_team_project" BOOLEAN DEFAULT false;
|
||||
|
||||
CREATE TABLE "team_studio_repositories" (
|
||||
"id" UUID NOT NULL,
|
||||
"group_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,
|
||||
|
||||
CONSTRAINT "team_studio_repositories_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX "team_studio_repositories_group_id_module_id_key"
|
||||
ON "team_studio_repositories"("group_id", "module_id");
|
||||
CREATE INDEX "team_studio_repositories_week_id_idx"
|
||||
ON "team_studio_repositories"("week_id");
|
||||
CREATE INDEX "team_studio_repositories_repo_owner_repo_name_idx"
|
||||
ON "team_studio_repositories"("repo_owner", "repo_name");
|
||||
|
||||
ALTER TABLE "team_studio_repositories"
|
||||
ADD CONSTRAINT "team_studio_repositories_group_id_fkey"
|
||||
FOREIGN KEY ("group_id") REFERENCES "student_groups"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
ALTER TABLE "team_studio_repositories"
|
||||
ADD CONSTRAINT "team_studio_repositories_module_id_fkey"
|
||||
FOREIGN KEY ("module_id") REFERENCES "course_week_modules"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
CREATE TABLE "team_custom_modules" (
|
||||
"id" UUID NOT NULL,
|
||||
"group_id" UUID NOT NULL,
|
||||
"creator_id" UUID NOT NULL,
|
||||
"course_id" UUID NOT NULL,
|
||||
"week" INTEGER NOT NULL,
|
||||
"sort_order" INTEGER NOT NULL,
|
||||
"category" TEXT NOT NULL,
|
||||
"name" TEXT NOT NULL,
|
||||
"folder_name" TEXT NOT NULL,
|
||||
"docker_image" TEXT,
|
||||
"package_name" TEXT NOT NULL,
|
||||
"launch_file" TEXT NOT NULL,
|
||||
"created_at" TIMESTAMPTZ(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updated_at" TIMESTAMPTZ(3) NOT NULL,
|
||||
CONSTRAINT "team_custom_modules_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX "team_custom_modules_group_id_course_id_week_folder_name_key"
|
||||
ON "team_custom_modules"("group_id", "course_id", "week", "folder_name");
|
||||
CREATE INDEX "team_custom_modules_group_id_course_id_week_sort_order_idx"
|
||||
ON "team_custom_modules"("group_id", "course_id", "week", "sort_order");
|
||||
|
||||
ALTER TABLE "team_custom_modules"
|
||||
ADD CONSTRAINT "team_custom_modules_group_id_fkey"
|
||||
FOREIGN KEY ("group_id") REFERENCES "student_groups"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
ALTER TABLE "team_custom_modules"
|
||||
ADD CONSTRAINT "team_custom_modules_creator_id_fkey"
|
||||
FOREIGN KEY ("creator_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
ALTER TABLE "team_custom_modules"
|
||||
ADD CONSTRAINT "team_custom_modules_course_id_fkey"
|
||||
FOREIGN KEY ("course_id") REFERENCES "courses"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
Reference in New Issue
Block a user