MariaDB
MariaDB shares the MySQL driver and configuration keys. Keep type: mariadb so the MariaDB-specific rules below apply instead of MySQL’s.
Install
pip install "dblift[mariadb]"Connection URL
mysql+pymysql://user:password@localhost:3306/appmariadb:// and mariadb+pymysql:// URLs are both accepted and normalised to mysql+pymysql. Engine identity comes from type, not from the URL scheme.
dblift.yaml
database:
type: mariadb
url: "mysql+pymysql://db.internal:3306/app"
ssl_enabled: true
connection_timeout: 30Engine settings
ssl_enabledfalseAdds ssl=true to the connection URL.connection_timeout30Sent to the driver as connect_timeout.session_variables{}Rendered into one SET SESSION statement and passed as init_command.options{}Merged into the URL query string after extra_params.Behaviour notes
A failed migration leaves earlier statements applied.
MySQL error 1093 does not apply here, so DBLift emits the plain form rather than a derived table.
Unlike MySQL, no rollback is issued after introspection.
MariaDB’s JSON type is a LONGTEXT alias with a validity check and has no CAST(… AS JSON), so JSON values bind as plain text with no cast.
ALTER TABLE … RENAME COLUMN needs 10.5.2 or later; native JSON typing needs 10.2 or later.
A captured server older than 10.5.2 is warned about. Nothing is rendered differently for it.