-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #627 from dzcode-io/feat/project-category
- Loading branch information
Showing
55 changed files
with
1,255 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
CREATE TABLE IF NOT EXISTS "tags" ( | ||
"id" text PRIMARY KEY NOT NULL, | ||
"record_imported_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL, | ||
"run_id" text DEFAULT 'initial-run-id' NOT NULL | ||
); | ||
--> statement-breakpoint | ||
ALTER TABLE "contributors" ALTER COLUMN "run_id" DROP DEFAULT;--> statement-breakpoint | ||
ALTER TABLE "projects" ALTER COLUMN "run_id" DROP DEFAULT; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
CREATE TABLE IF NOT EXISTS "project_tag_relation" ( | ||
"project_id" text NOT NULL, | ||
"tag_id" text NOT NULL, | ||
"record_imported_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL, | ||
"run_id" text DEFAULT 'initial-run-id' NOT NULL, | ||
CONSTRAINT "project_tag_relation_pk" PRIMARY KEY("project_id","tag_id") | ||
); | ||
--> statement-breakpoint | ||
DO $$ BEGIN | ||
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; | ||
EXCEPTION | ||
WHEN duplicate_object THEN null; | ||
END $$; |
Oops, something went wrong.