Skip to content

v3.8.0

Latest

Choose a tag to compare

@timriley timriley released this 27 Nov 12:20
v3.8.0
08b3c1f

Added

  • Support plain SQL migrations. Write a migration as a .sql file in your migrations directory, and use -- @migrate comment 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/end sections, which run in order. Use split= on a begin line 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)