Validation

Catch issues as you design

Relmic validates your schema in real time, highlighting errors and warnings directly in the editor. Catch reserved keywords, naming conflicts, and DBMS-specific issues before they reach your production database.

How validation works

Validation runs continuously as you edit your schema. When Relmic detects an issue, it highlights the affected table or column with an inline warning. The validation panel in the sidebar provides a full list of all current issues with descriptions and suggestions for how to fix them.

Validation rules are DBMS-aware — the rules that apply depend on the target DBMS you selected for your project. If you switch DBMS, the validation rules update automatically.

Reserved keyword detection

SQL reserved keywords are words that have special meaning in the SQL language. Using them as table or column names can cause syntax errors or unexpected behavior in queries. Relmic warns you when a name conflicts with a reserved keyword for your target DBMS.

Common examples

WordContextNote
ordertable nameReserved in most SQL dialects. Use "orders" instead.
usertable nameReserved in PostgreSQL and SQL Server. Use "users" or "app_user".
groupcolumn nameReserved in all SQL dialects. Use "user_group" or "team_group".
selectcolumn nameA core SQL keyword. Will cause syntax errors in queries.

Reserved keyword lists differ between DBMS. A name that is safe in PostgreSQL may be reserved in MySQL. Relmic checks against the reserved words for your specific target DBMS.

Naming conflict detection

Relmic detects duplicate names that would cause errors when the schema is applied to a database:

  • Duplicate table names — two tables with the same name in the same schema.
  • Duplicate column names — two columns with the same name in the same table.
  • Constraint name conflicts — two constraints with the same name across the schema.

Conflicts are highlighted immediately in the editor with a red underline. The validation panel shows the exact location of both conflicting items.

DBMS-specific rules

Each DBMS has its own set of rules, limits, and constraints. Relmic validates your schema against these rules so the exported code runs without errors.

PostgreSQL

  • Identifier length limit: 63 characters
  • SERIAL and BIGSERIAL auto-increment handling
  • Array types and composite types validation
  • TIMESTAMPTZ vs TIMESTAMP distinction

MySQL

  • Identifier length limit: 64 characters
  • ENGINE=InnoDB required for foreign keys
  • ENUM type value validation
  • AUTO_INCREMENT column must be a key

SQL Server

  • Identifier length limit: 128 characters
  • IDENTITY column constraints
  • NVARCHAR vs VARCHAR handling
  • Schema-qualified naming rules

SQLite

  • Limited ALTER TABLE support
  • No ENUM type
  • Flexible type affinity system
  • AUTOINCREMENT only on INTEGER PRIMARY KEY

Oracle

  • Identifier length limit: 128 characters (12c+)
  • NUMBER precision and scale validation
  • VARCHAR2 vs CHAR handling
  • Sequence-based auto-increment

The validation panel

The validation panel in the editor sidebar shows all current issues in your schema. Each issue includes:

  • Severity — error (blocks export) or warning (informational).
  • Location — which table and column are affected.
  • Description — what the issue is and why it matters.
  • Suggestion — a recommended fix when available.

Click any issue in the panel to jump directly to the affected table on the canvas. Fix the issue and it disappears from the list immediately.