Reylo Migrate
Put your schema in a SQL file, and Reylo Migrate writes the migrations
Model your schema in schema.sql, write each change into a migration with reylo migrate new, and run it with reylo migrate dev:
Basic usage
Install the reylo command:
brew install reylosql/tap/reylonpm install --global reylocurl -fsSL https://reylo.dev/install.sh | shirm https://reylo.dev/install.ps1 | iexscoop bucket add reylo https://github.com/reylosql/scoop-bucket
scoop install reyloStart your migrations from your database:
$ reylo migrate init
✓ Started reylo/ from postgres://localhost:5432/app
reylo/
├── schema.sql this database's schema
├── migrations/
│ └── init.sql the same, recorded as run here
└── reylo.lock the order the migrations run inThis produces a reylo directory. This path can be modified with the dir config in .reylo.yaml. It should be committed to version control.
To change your schema, edit schema.sql:
create table users (
id integer primary key,
email text not null
email text not null,
bio text
);Write the migration:
$ reylo migrate new add_bio
✓ Wrote reylo/migrations/20261104140347_add_bio.sql
+ column users.bio textIt's a plain SQL file. You can edit it as you see fit (e.g. adding data migration logic).
alter table add column bio text;Run it on your development database:
$ reylo migrate dev
Applying to postgres://localhost:5432/app
✓ 20261104140347_add_bio.sql applied · 4 ms
✓ Wrote reylo/reylo.lockCommit it with the lock, and deploy:
$ reylo migrate deploy
Applying to postgres://db.example.com/app
✓ 20261104140347_add_bio.sql applied · 12 ms
✓ Applied 1 migrationA coding agent can set it up for you: