docs: add DB table creation rules and guidelines

- Introduced essential rules for creating database tables, emphasizing the use of `VARCHAR(500)` for all business columns and the inclusion of five mandatory columns.
- Specified the requirement for registering three metadata tables: `table_labels`, `table_type_columns`, and `column_labels`.
- Outlined prohibited practices, including the direct use of certain database types and the necessity of including the `ON CONFLICT` clause for handling duplicates.

Made-with: Cursor
This commit is contained in:
kjs
2026-03-11 15:04:05 +09:00
parent fa97b361ed
commit 5fb1f705dc
4 changed files with 34 additions and 3 deletions

View File

@@ -3574,7 +3574,7 @@ export async function getTableSchema(
ic.character_maximum_length,
ic.numeric_precision,
ic.numeric_scale,
COALESCE(ttc_company.column_label, ttc_common.column_label) AS column_label,
COALESCE(NULLIF(ttc_company.column_label, ic.column_name), ttc_common.column_label) AS column_label,
COALESCE(ttc_company.display_order, ttc_common.display_order) AS display_order,
COALESCE(ttc_company.is_nullable, ttc_common.is_nullable) AS ttc_is_nullable,
COALESCE(ttc_company.is_unique, ttc_common.is_unique) AS ttc_is_unique