SqlOtter

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.

  1. Check the connection, database/Schema and selected object-tree table. F6 opens read-only structure; Alt+Enter / ⌥+Enter opens editing where supported.
  2. 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.
  3. 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.
  4. 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.