Database Indexes and Constraints
Inspect existing indexes and relationships, create supported indexes, and review foreign-key changes with engine-specific limits.
How it works
Open Edit table structure for the selected existing table. Index shows Name, Type, Fields and Unique; Relations shows local/reference endpoints and actions. Relational Add Index/OK and Delete Index execute independently, while Relations additions/deletions wait for the parent save and SQL Preview. Docs now follows the captured test.test_docs example: idx_review_note on review_note, then id → test2.admin_menus.parent_id in a separate staged relationship and matching pre-Execute preview.
- Check the connection, database/Schema and selected object-tree table. F6 opens read-only structure; Alt+Enter / ⌥+Enter opens editing where supported.
- Inspect indexes and full server definitions. The captured Add Index form checks review_note, names idx_review_note, selects BTREE and leaves Unique unchecked. Review before OK; relational OK and Delete Index directly attempt their database operations.
- For a supported single-column foreign key, use Relations → Add to choose both endpoints, name and actions. The captured id → test2.admin_menus.parent_id form and matching preview both use RESTRICT for update/delete. Add/Delete stages changes; use Save Changes directly to review editable SQL Preview.
- Cancel an unsubmitted form/preview or deliberately Execute the reviewed commands. Read the outcome and reopen the target to check actual metadata and enforcement; parent Cancel cannot undo an applied index change.
Availability and limits
Current-development draft, source-reviewed and supplemented with three authentic owner originals on 2026-10-18. Four exact lossless crops show Index context, Add Index, Add Foreign Key and the matching pre-Execute preview. Execution, fresh metadata, enforcement, physical shortcuts, complete engine workflows and named-release acceptance remain pending.
- Ordinary/unique indexes, primary/unique constraints, foreign keys and CHECK are distinct. Unique = Yes is not a complete constraint description; this surface has no dedicated CHECK editor or composite-foreign-key form.
- Generic type/action choices do not establish per-engine support. SQLite Relations add/drop currently emits rebuild comments only. Snowflake structure editing is unsupported and standard-table foreign keys are informational; Redis relational concepts are not applicable.
- MongoDB uses a separate staged Index flow with createIndex/dropIndex, Unique/Sparse/key/TTL semantics. TTL can expire documents; relational Index timing does not apply there.
- Relations Refresh does not clear its pending changes. Constraint dependencies, missing DDL, disabled/validated state and failed batches need actual server review; metadata, archived declarations and diagram links alone do not establish enforcement.
- The supplied relationship images stop before execution. Referenced-key eligibility, types, data and storage engines are unverified; Document formatted is formatter feedback. Use the captures to follow configuration and review, then verify your own target before submission.