-
-
Notifications
You must be signed in to change notification settings - Fork 0
docs: update schema documentation #7
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 | | | | | ||
|
Comment on lines
+7
to
+12
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The column comments are missing. It would be very helpful to add comments explaining the purpose of each column, especially for For example, for
And for
Since this file is auto-generated, you might need to add these comments to the table definition in the database schema and regenerate the documentation. |
||
|
|
||
| ## 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) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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"] | ||
| } | ||
| ] | ||
| } | ||
|
Comment on lines
+2403
to
2468
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The JSON schema definition for
|
||
| ], | ||
| "relations": [ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description for the
behavior_cachestable is missing. It's important to document the purpose of the table for future reference. Based on the pull request description, a good description would be to explain what this table caches and why.