3 ms·
What I want: an SQL (actually, it could be just Postgres as I only use that) parser that takes two schema declarations and calculates the commands needed to go
by fiatjaf 8y ago
What I want: an SQL (actually, it could be just Postgres as I only use that) parser that takes two schema declarations and calculates the commands needed to go from one to the other, so we can have automatic migrations.
For example, if A is
CREATE TABLE person (
id serial PRIMARY KEY,
name text
)
and B is
CREATE TABLE person (
id serial PRIMARY KEY,
name text,
age int
)
Then this tool would output
ALTER TABLE person ADD COLUMN age int