Repository navigation
Added
-
Support plain SQL migrations. Write a migration as a
.sqlfile in your migrations directory, and use-- @migratecomment directives to mark its up and down sections. (@alassek in #440)-- @migrate up -- @migrate begin split=semicolon CREATE TABLE users (id INTEGER PRIMARY KEY); CREATE INDEX users_id_idx ON users (id); -- @migrate end -- @migrate down -- @migrate begin DROP TABLE users -- @migrate end
Each direction can have one or more
begin/endsections, which run in order. Usesplit=on abeginline to run its body as one statement (the default), split it on semicolons (split=semicolon), or split it by line (split=line). The down section is optional.
Changed
- Require Ruby 3.3 or later.
Fixed
- Apply read types only once to tuples returned from Create commands. Before, read types were applied twice on all databases except PostgreSQL, which caused errors for read types that could not be applied twice. (@katafrakt in #432)