The idea behind a schema may travel well between databases, but the SQL does not always travel unchanged. Identifier quoting, data types, generated identifiers, and constraint behavior differ. SchemaCraft keeps a common model and generates the syntax for your selected dialect.
Names need the right quotes
SchemaCraft quotes identifiers so names do not accidentally collide with SQL keywords. PostgreSQL and SQLite use double quotes, MySQL uses backticks, and SQL Server uses brackets. Quoting identifiers is separate from quoting string values, which use single quotes.
Automatic identifiers use different syntax
| Dialect | Generated identifier |
|---|---|
| PostgreSQL | GENERATED BY DEFAULT AS IDENTITY |
| MySQL | AUTO_INCREMENT |
| SQLite | INTEGER PRIMARY KEY AUTOINCREMENT |
| SQL Server | IDENTITY(1,1) |
In SQLite, AUTOINCREMENT has particular semantics and overhead beyond the automatic row identifier behavior of INTEGER PRIMARY KEY. SchemaCraft uses it when you explicitly turn on auto-increment. Review whether that guarantee is necessary for your application.
Types can be native, mapped, or approximated
PostgreSQL supports native UUID and JSONB types. SchemaCraft maps UUID to CHAR(36) in MySQL and UNIQUEIDENTIFIER in SQL Server. SQLite stores UUID and JSON values as text in generated schemas. JSONB maps to JSON for MySQL and to NVARCHAR(MAX) for SQL Server.
These mappings preserve a place to store the value; they do not make all database behavior equivalent. SQLite’s type affinity does not enforce a VARCHAR-style length. SQL Server JSON stored as text may need an explicit JSON validity check for your application. Test validation and queries on the database you will actually use.
Foreign key ordering matters
For PostgreSQL, MySQL, and SQL Server, SchemaCraft creates tables first, creates indexes, and then adds foreign keys with ALTER TABLE. That allows circular references to be declared after all tables exist. SQLite receives inline foreign keys and a PRAGMA that enables foreign key enforcement for the current connection.
Applications using SQLite should enable foreign keys on every relevant connection. An exported schema’s PRAGMA does not configure future independent connections.
Review version and engine assumptions
MySQL exports target modern MySQL 8 with InnoDB. CHECK enforcement requires MySQL 8.0.16 or newer; certain expression defaults require 8.0.13 or newer. SQL Server may reject multiple cascade paths or cyclic cascade definitions. MySQL InnoDB does not support SET DEFAULT foreign key actions.
A diagram is a design, not a migration runner
The SQL preview produces a fresh schema definition. It does not compare against a live database, migrate existing rows, or execute SQL. Review the generated script, run it in a disposable database, and manage deployment through your own migration process.
Keep a JSON backup as the editable source. An SQL round trip can lose visual positions, descriptions, original abstract types, and unsupported vendor-specific features.
References: SQLite AUTOINCREMENT, MySQL CHECK constraints, and SQL Server CREATE TABLE.