From 8f947df1f1d7d1672c6857a27012777515b0aa70 Mon Sep 17 00:00:00 2001 From: KubrickCode <126654223+KubrickCode@users.noreply.github.com> Date: Sat, 24 Jan 2026 03:37:44 +0000 Subject: [PATCH] docs: update schema documentation --- docs/schema/README.md | 7 +++ docs/schema/public.behavior_caches.md | 45 ++++++++++++++++++ docs/schema/schema.json | 66 +++++++++++++++++++++++++++ 3 files changed, 118 insertions(+) create mode 100644 docs/schema/public.behavior_caches.md diff --git a/docs/schema/README.md b/docs/schema/README.md index 9df0f57..81f8268 100644 --- a/docs/schema/README.md +++ b/docs/schema/README.md @@ -28,6 +28,7 @@ | [public.usage_events](public.usage_events.md) | 7 | | BASE TABLE | | [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 | ## Enums @@ -321,6 +322,12 @@ erDiagram timestamp_with_time_zone created_at timestamp_with_time_zone updated_at } +"public.behavior_caches" { + uuid id + bytea cache_key_hash + text converted_description + timestamp_with_time_zone created_at +} ``` --- diff --git a/docs/schema/public.behavior_caches.md b/docs/schema/public.behavior_caches.md new file mode 100644 index 0000000..068ac84 --- /dev/null +++ b/docs/schema/public.behavior_caches.md @@ -0,0 +1,45 @@ +# public.behavior_caches + +## Description + +## Columns + +| Name | Type | Default | Nullable | Children | Parents | Comment | +| --------------------- | ------------------------ | ----------------- | -------- | -------- | ------- | ------- | +| id | uuid | gen_random_uuid() | false | | | | +| cache_key_hash | bytea | | false | | | | +| converted_description | text | | false | | | | +| created_at | timestamp with time zone | now() | false | | | | + +## Constraints + +| Name | Type | Definition | +| ---------------------- | ----------- | ----------------------- | +| behavior_caches_pkey | PRIMARY KEY | PRIMARY KEY (id) | +| uq_behavior_caches_key | UNIQUE | UNIQUE (cache_key_hash) | + +## Indexes + +| Name | Definition | +| ------------------------------ | ------------------------------------------------------------------------------------------------- | +| behavior_caches_pkey | CREATE UNIQUE INDEX behavior_caches_pkey ON public.behavior_caches USING btree (id) | +| uq_behavior_caches_key | CREATE UNIQUE INDEX uq_behavior_caches_key ON public.behavior_caches USING btree (cache_key_hash) | +| idx_behavior_caches_created_at | CREATE INDEX idx_behavior_caches_created_at ON public.behavior_caches USING btree (created_at) | + +## Relations + +```mermaid +erDiagram + + +"public.behavior_caches" { + uuid id + bytea cache_key_hash + text converted_description + 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 aada021..98c6b05 100644 --- a/docs/schema/schema.json +++ b/docs/schema/schema.json @@ -2399,6 +2399,72 @@ "columns": ["id"] } ] + }, + { + "name": "public.behavior_caches", + "type": "BASE TABLE", + "columns": [ + { + "name": "id", + "type": "uuid", + "nullable": false, + "default": "gen_random_uuid()" + }, + { + "name": "cache_key_hash", + "type": "bytea", + "nullable": false + }, + { + "name": "converted_description", + "type": "text", + "nullable": false + }, + { + "name": "created_at", + "type": "timestamp with time zone", + "nullable": false, + "default": "now()" + } + ], + "indexes": [ + { + "name": "behavior_caches_pkey", + "def": "CREATE UNIQUE INDEX behavior_caches_pkey ON public.behavior_caches USING btree (id)", + "table": "public.behavior_caches", + "columns": ["id"] + }, + { + "name": "uq_behavior_caches_key", + "def": "CREATE UNIQUE INDEX uq_behavior_caches_key ON public.behavior_caches USING btree (cache_key_hash)", + "table": "public.behavior_caches", + "columns": ["cache_key_hash"] + }, + { + "name": "idx_behavior_caches_created_at", + "def": "CREATE INDEX idx_behavior_caches_created_at ON public.behavior_caches USING btree (created_at)", + "table": "public.behavior_caches", + "columns": ["created_at"] + } + ], + "constraints": [ + { + "name": "behavior_caches_pkey", + "type": "PRIMARY KEY", + "def": "PRIMARY KEY (id)", + "table": "public.behavior_caches", + "referenced_table": "", + "columns": ["id"] + }, + { + "name": "uq_behavior_caches_key", + "type": "UNIQUE", + "def": "UNIQUE (cache_key_hash)", + "table": "public.behavior_caches", + "referenced_table": "", + "columns": ["cache_key_hash"] + } + ] } ], "relations": [