Skip to content

Commit 67a223b

Browse files
authored
Merge pull request #627 from dzcode-io/feat/project-category
2 parents 58ea3c9 + 70b3c8e commit 67a223b

File tree

55 files changed

+1255
-59
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+1255
-59
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CREATE TABLE IF NOT EXISTS "tags" (
2+
"id" text PRIMARY KEY NOT NULL,
3+
"record_imported_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
4+
"run_id" text DEFAULT 'initial-run-id' NOT NULL
5+
);
6+
--> statement-breakpoint
7+
ALTER TABLE "contributors" ALTER COLUMN "run_id" DROP DEFAULT;--> statement-breakpoint
8+
ALTER TABLE "projects" ALTER COLUMN "run_id" DROP DEFAULT;
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
CREATE TABLE IF NOT EXISTS "project_tag_relation" (
2+
"project_id" text NOT NULL,
3+
"tag_id" text NOT NULL,
4+
"record_imported_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
5+
"run_id" text DEFAULT 'initial-run-id' NOT NULL,
6+
CONSTRAINT "project_tag_relation_pk" PRIMARY KEY("project_id","tag_id")
7+
);
8+
--> statement-breakpoint
9+
DO $$ BEGIN
10+
ALTER TABLE "project_tag_relation" ADD CONSTRAINT "project_tag_relation_project_id_projects_id_fk" FOREIGN KEY ("project_id") REFERENCES "public"."projects"("id") ON DELETE no action ON UPDATE no action;
11+
EXCEPTION
12+
WHEN duplicate_object THEN null;
13+
END $$;

0 commit comments

Comments
 (0)