-
Notifications
You must be signed in to change notification settings - Fork 138
Description
I realize that everyone has their favorite coolaid but applying the migrations with the current pattern makes it a bit difficult to implement. I was wondering if there was a way to run the river CLI tool to generate a SQL patch of the given changes?
Most people have already chosen a tool they like and are actively using it, so having yet another way to modify the SQL schema is a bit distasteful. Now we have two different tools that have write access to a DB that need to be both installed, managed and executed as part of a given deployment.
Given the wide range of options in the ecosystem. (See below), I was wondering if we could just create a SQL
- https://github.com/ariga/atlas
- https://github.com/amacneil/dbmate
- https://github.com/golang-migrate/migrate
- https://github.com/pressly/goose
- https://github.com/rubenv/sql-migrate
What I'd like to see is something like.
river migrate-up --dry ## or pick your favorite syntax to achieve the goal.
SQL:
-- migrate-up
ALTER TABLE add COLUMN....
--migrate-down
ALTER TABLE DROP COLUMN....How you choose to integrate the SQL into your migration tool is up to you, but at least give me the SQL that will be executed.