14 lines
489 B
SQL
14 lines
489 B
SQL
CREATE TABLE "inventory_export_jobs" (
|
|
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
"seller_id" uuid NOT NULL REFERENCES "sellers"("id") ON DELETE CASCADE,
|
|
"format" text NOT NULL,
|
|
"status" text DEFAULT 'PENDING' NOT NULL,
|
|
"output" jsonb,
|
|
"error" text,
|
|
"created_at" timestamptz DEFAULT now() NOT NULL,
|
|
"updated_at" timestamptz DEFAULT now() NOT NULL
|
|
);
|
|
|
|
CREATE INDEX "inventory_export_jobs_status_created_at_index"
|
|
ON "inventory_export_jobs" ("status", "created_at");
|