AI-Assisted Table Design Workflow
Who this is for
For users who need to quickly generate table schema drafts and progressively refine them through conversational input or small-step table edits.
What this solves
You can turn business requirements into executable field and index drafts, or ask AI to generate a reviewable change list from the current table, then manually review key constraints.
Prerequisites
- You have defined the business entity, key primary key, and core query scenarios.
AI Table WorkshoporAI Modifycan be opened normally on the current page.
Steps
- Click
AI Table Workshopin the table configuration area. Result: the AI conversation panel opens. - Enter your first requirement with clear object, key fields, constraints, and index preferences. Result: AI returns the first schema draft, with design decision explanations (such as why a certain type was chosen, why an index was set).
- If current configuration already exists, continue with instructions like "add fields", "adjust types", and "add indexes". Result: AI generates continuously based on existing context without re-describing everything; if the workspace already has
Schema Name, it is also passed in as table-level context. - If you need standard field reuse, select templates before generating. Result: AI prioritizes template fields and improves structural consistency.
- After confirming the result, click
Apply to table config. Result: fields and indexes are written into workspace and become editable; if AI returnsschemaNameor a schema-qualified table name, the system splits and fillsSchema NameandTable Nameautomatically. - Return to the main interface and manually review key items. Result: types, nullable, default values, index naming, and business constraints are finally confirmed.
- When an existing table needs a local adjustment, click
AI Modifyin the header and describe the target change, such as "add a deleted_at soft-delete field and change the phone unique index to phone plus tenant ID". Result: AI generates table-level, field, and index change details based on the current table. - In the
AI Modifypanel, accept or reject each change, then clickApply selected changes. Result: accepted changes are written into the current table configuration, while unaccepted changes remain unapplied. - When you need to supplement comments for tables and fields, request AI to generate Chinese business comments. Result: AI infers semantics based on field names and types, generates concise Chinese comments, and fills them into
Table Chinese NameandField Chinese Name.
Done when
- AI results have been successfully applied to the current table configuration.
- When using AI Modify, target changes have been reviewed item by item and written into the workspace.
- Field and index count, naming, and constraints match the target business scenario.
- If this design requires a schema,
Schema Nameis aligned with the target table after apply. - If AI comments were used, table and field Chinese names are supplemented and semantically accurate.
- DDL output on the right is ready to enter the review flow.
Common pitfalls and failure handling
- Input is too short: AI output becomes generic. Add business semantics, field roles, and constraints, then retry.
- If you need a schema-qualified table, state the schema directly in the prompt, or fill
Schema Namein the workspace before continuing the conversation. - Generation fails or is interrupted: keep current prompt and retry once directly; if needed, split into smaller requests.
- Direct execution risk: AI output is a draft. Do not skip manual review before execution.
- History drifts from target: use
Restartto clear context and rebuild requirements with the new goal. - AI comments are semantic inferences and may have deviations; manual review of key business field comment accuracy is recommended after generation.
- AI Modify works best for small-step schema edits. For changes involving business meaning, compatibility, or index strategy, inspect each change detail before applying.