2023-04-28 20:43:58 +00:00
|
|
|
##########
|
2022-10-31 10:49:21 +00:00
|
|
|
|
2023-04-28 20:43:58 +00:00
|
|
|
CREATE TABLE "category_types_history"
|
2022-10-31 10:49:21 +00:00
|
|
|
(
|
2023-04-28 20:43:58 +00:00
|
|
|
"id" BIGSERIAL NOT NULL,
|
|
|
|
"action" VARCHAR(16) NOT NULL,
|
|
|
|
"original_id" BIGINT NOT NULL,
|
|
|
|
"description" VARCHAR(64) NOT NULL,
|
|
|
|
"editor" BIGINT NOT NULL,
|
|
|
|
"status" BIGINT NOT NULL,
|
|
|
|
"sort_order" REAL NOT NULL,
|
|
|
|
"queued_at" BIGINT NOT NULL,
|
|
|
|
"created_at" TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
"updated_at" TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
"triggered_at" TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
"changed_at" TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
"payload" JSONB NULL,
|
|
|
|
CONSTRAINT "pk_category_types_history" PRIMARY KEY ("id")
|
|
|
|
);
|
2022-10-31 10:49:21 +00:00
|
|
|
|
2023-04-28 20:43:58 +00:00
|
|
|
##########
|
2022-10-31 10:49:21 +00:00
|
|
|
|
2023-04-28 20:43:58 +00:00
|
|
|
CREATE TABLE "category_types"
|
2022-10-31 10:49:21 +00:00
|
|
|
(
|
2023-04-28 20:43:58 +00:00
|
|
|
"id" BIGINT NOT NULL,
|
|
|
|
"description" VARCHAR(64) NOT NULL,
|
|
|
|
"editor" BIGINT NOT NULL DEFAULT 0,
|
|
|
|
"status" BIGINT NOT NULL DEFAULT 0,
|
|
|
|
"sort_order" REAL NOT NULL DEFAULT 0,
|
|
|
|
"queued_at" BIGINT NOT NULL DEFAULT 0,
|
|
|
|
"created_at" TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
"updated_at" TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
"payload" JSONB NULL,
|
|
|
|
CONSTRAINT "pk_category_types" PRIMARY KEY ("id")
|
|
|
|
);
|
|
|
|
|
|
|
|
##########
|
|
|
|
|
|
|
|
CREATE INDEX "idx_category_types_status" ON "category_types" ("status");
|
2023-05-01 07:22:25 +00:00
|
|
|
|