diff --git a/docs/schema/README.md b/docs/schema/README.md index 81f8268..449b60c 100644 --- a/docs/schema/README.md +++ b/docs/schema/README.md @@ -29,6 +29,7 @@ | [public.subscription_plans](public.subscription_plans.md) | 7 | | BASE TABLE | | [public.user_subscriptions](public.user_subscriptions.md) | 9 | | BASE TABLE | | [public.behavior_caches](public.behavior_caches.md) | 4 | | BASE TABLE | +| [public.classification_caches](public.classification_caches.md) | 7 | | BASE TABLE | ## Enums @@ -328,6 +329,15 @@ erDiagram text converted_description timestamp_with_time_zone created_at } +"public.classification_caches" { + uuid id + bytea content_hash + varchar_10_ language + varchar_100_ model_id + jsonb phase1_output + jsonb test_index_map + timestamp_with_time_zone created_at +} ``` --- diff --git a/docs/schema/public.classification_caches.md b/docs/schema/public.classification_caches.md new file mode 100644 index 0000000..5ff32de --- /dev/null +++ b/docs/schema/public.classification_caches.md @@ -0,0 +1,51 @@ +# public.classification_caches + +## Description + +## Columns + +| Name | Type | Default | Nullable | Children | Parents | Comment | +| -------------- | ------------------------ | ----------------- | -------- | -------- | ------- | ------- | +| id | uuid | gen_random_uuid() | false | | | | +| content_hash | bytea | | false | | | | +| language | varchar(10) | | false | | | | +| model_id | varchar(100) | | false | | | | +| phase1_output | jsonb | | false | | | | +| test_index_map | jsonb | | false | | | | +| created_at | timestamp with time zone | now() | false | | | | + +## Constraints + +| Name | Type | Definition | +| ---------------------------- | ----------- | ----------------------------------------- | +| classification_caches_pkey | PRIMARY KEY | PRIMARY KEY (id) | +| uq_classification_caches_key | UNIQUE | UNIQUE (content_hash, language, model_id) | + +## Indexes + +| Name | Definition | +| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- | +| classification_caches_pkey | CREATE UNIQUE INDEX classification_caches_pkey ON public.classification_caches USING btree (id) | +| uq_classification_caches_key | CREATE UNIQUE INDEX uq_classification_caches_key ON public.classification_caches USING btree (content_hash, language, model_id) | +| idx_classification_caches_created_at | CREATE INDEX idx_classification_caches_created_at ON public.classification_caches USING btree (created_at) | + +## Relations + +```mermaid +erDiagram + + +"public.classification_caches" { + uuid id + bytea content_hash + varchar_10_ language + varchar_100_ model_id + jsonb phase1_output + jsonb test_index_map + timestamp_with_time_zone created_at +} +``` + +--- + +> Generated by [tbls](https://github.com/k1LoW/tbls) diff --git a/docs/schema/schema.json b/docs/schema/schema.json index 98c6b05..760e14b 100644 --- a/docs/schema/schema.json +++ b/docs/schema/schema.json @@ -2465,6 +2465,87 @@ "columns": ["cache_key_hash"] } ] + }, + { + "name": "public.classification_caches", + "type": "BASE TABLE", + "columns": [ + { + "name": "id", + "type": "uuid", + "nullable": false, + "default": "gen_random_uuid()" + }, + { + "name": "content_hash", + "type": "bytea", + "nullable": false + }, + { + "name": "language", + "type": "varchar(10)", + "nullable": false + }, + { + "name": "model_id", + "type": "varchar(100)", + "nullable": false + }, + { + "name": "phase1_output", + "type": "jsonb", + "nullable": false + }, + { + "name": "test_index_map", + "type": "jsonb", + "nullable": false + }, + { + "name": "created_at", + "type": "timestamp with time zone", + "nullable": false, + "default": "now()" + } + ], + "indexes": [ + { + "name": "classification_caches_pkey", + "def": "CREATE UNIQUE INDEX classification_caches_pkey ON public.classification_caches USING btree (id)", + "table": "public.classification_caches", + "columns": ["id"] + }, + { + "name": "uq_classification_caches_key", + "def": "CREATE UNIQUE INDEX uq_classification_caches_key ON public.classification_caches USING btree (content_hash, language, model_id)", + "table": "public.classification_caches", + "columns": ["content_hash", "language", "model_id"] + }, + { + "name": "idx_classification_caches_created_at", + "def": "CREATE INDEX idx_classification_caches_created_at ON public.classification_caches USING btree (created_at)", + "table": "public.classification_caches", + "columns": ["created_at"] + } + ], + "constraints": [ + { + "name": "classification_caches_pkey", + "type": "PRIMARY KEY", + "def": "PRIMARY KEY (id)", + "table": "public.classification_caches", + "referenced_table": "", + "columns": ["id"] + }, + { + "name": "uq_classification_caches_key", + "type": "UNIQUE", + "def": "UNIQUE (content_hash, language, model_id)", + "table": "public.classification_caches", + "referenced_table": "", + "columns": ["content_hash", "language", "model_id"] + } + ] } ], "relations": [