|
| 1 | +-- Create index "idx_digger_job_id" to table: "digger_jobs" |
| 2 | +CREATE INDEX "idx_digger_job_id" ON "public"."digger_jobs" ("batch_id"); |
| 3 | +-- Create index "idx_digger_run_batch_id" to table: "digger_run_stages" |
| 4 | +CREATE INDEX "idx_digger_run_batch_id" ON "public"."digger_run_stages" ("batch_id"); |
| 5 | +-- Create "digger_run_queue_items" table |
| 6 | +CREATE TABLE "public"."digger_run_queue_items" ( |
| 7 | + "id" bigserial NOT NULL, |
| 8 | + "created_at" timestamptz NULL, |
| 9 | + "updated_at" timestamptz NULL, |
| 10 | + "deleted_at" timestamptz NULL, |
| 11 | + "project_id" bigint NULL, |
| 12 | + "digger_run_id" bigint NULL, |
| 13 | + PRIMARY KEY ("id"), |
| 14 | + CONSTRAINT "fk_digger_run_queue_items_digger_run" FOREIGN KEY ("digger_run_id") REFERENCES "public"."digger_runs" ("id") ON UPDATE NO ACTION ON DELETE NO ACTION, |
| 15 | + CONSTRAINT "fk_digger_run_queue_items_project" FOREIGN KEY ("project_id") REFERENCES "public"."projects" ("id") ON UPDATE NO ACTION ON DELETE NO ACTION |
| 16 | +); |
| 17 | +-- Create index "idx_digger_run_queue_items_deleted_at" to table: "digger_run_queue_items" |
| 18 | +CREATE INDEX "idx_digger_run_queue_items_deleted_at" ON "public"."digger_run_queue_items" ("deleted_at"); |
| 19 | +-- Create index "idx_digger_run_queue_project_id" to table: "digger_run_queue_items" |
| 20 | +CREATE INDEX "idx_digger_run_queue_project_id" ON "public"."digger_run_queue_items" ("project_id"); |
| 21 | +-- Create index "idx_digger_run_queue_run_id" to table: "digger_run_queue_items" |
| 22 | +CREATE INDEX "idx_digger_run_queue_run_id" ON "public"."digger_run_queue_items" ("digger_run_id"); |
| 23 | +-- Drop "digger_run_queues" table |
| 24 | +DROP TABLE "public"."digger_run_queues"; |
0 commit comments