Skip to content

Database Support

MySQL and MariaDB

MySQL and MariaDB use direct DDL operations where available, including table and column alteration, index operations, and foreign-key operations.

MariaDB compatibility includes column renames generated with CHANGE COLUMN, which carries the complete final column definition.

The introspector normalizes driver representations such as:

  • BOOLEAN and TINYINT(1)
  • quoted defaults
  • decimal defaults such as 0 and 0.00
  • NO ACTION and RESTRICT
  • MariaDB's JSON alias representation

SQLite

SQLite supports schema creation, introspection, indexes, foreign keys, explicit renames, and migration convergence.

SQLite cannot directly execute several common alteration operations. Schemage uses a driver-specific planner to replace affected operations with table recreation.

A recreation generally performs:

  1. create a temporary table with the desired definition
  2. copy compatible and renamed columns
  3. drop the original table
  4. rename the temporary table
  5. recreate secondary indexes

SQLite requires auto-incrementing identifiers to use INTEGER PRIMARY KEY AUTOINCREMENT. The introspector maps that physical representation back to Schemage's logical id() definition.

PostgreSQL

PostgreSQL support is planned but is not included in version 1.0.