← ClaudeAtlas

schema-authoringlisted

Author a Schema.yaml from scratch for the Jardis Designer — from a plain-text domain idea, draft tables (snake_case plural), columns with realistic types, primary keys, indexes (primary/unique/index), optional foreign keys. Output matches the DB-export format the Designer's importer parses.
jardisTools/dev-skills · ★ 0 · API & Backend · score 76
Install: claude install-skill jardisTools/dev-skills
## Driving rules 1. Ask for the domain idea (one paragraph). If vague: **one** sharp clarifying question, not an interrogation. 2. Tables = plural snake_case. Implicit collections → own tables. 3. Every table: PK (`int` autoincrement default; UUID only if domain dictates). Business identifier → `unique` index. Lookup/filter column → non-unique `index`. 4. FKs **optional** — only include when the relation is unambiguous. Otherwise `foreignKeys: {}` and let the Designer model relations interactively. 5. Output = one complete `Schema.yaml` block + explicit assumption list. Import instruction: `Schema → Import → File` in the Designer. ### 1. Schema.yaml structure ```yaml tables: <table_name_snake_case>: # table name = the map key (no separate `name:` field) columns: - name: <column_name> type: <SQL type, see catalogue> phpType: <int | string | datetime | float | bool> length: <optional integer, for varchar/char> nullable: <true | false> primary: <true | false> # PK column only autoincrement: <true | false> # PK int only indexes: - name: <index_name | PRIMARY> columns: [<col>, <col>, …] type: <primary | unique | index> foreignKeys: {} # empty map OR list of: - column: <local_column> referencedTable: <other_table> referencedColumn: <other_column> ``` **Column required:** `name`, `type`, `phpT