Changing a column's type or constraints generates a migration with an empty ALTER TABLE statement for that table, e.g.:
If running sql-schema schema generates
-- schema.sql
CREATE TABLE foo (
bar INT
);
Then changing INT to TEXT (or anything else) and running sql-schema migration will generate a migration with an empty ALTER TABLE foo (or nothing at all after #11 / v0.6.2).
This is because the we're currently only comparing at the column name level and performing DROP COLUMN or ADD COLUMN operations.
For PostgreSQL, it should generate something like
-- 002_alter_foo.up.sql
ALTER TABLE foo
ALTER COLUMN bar SET DATA TYPE TEXT -- TODO: USING ...;
Changing a column's type or constraints generates a migration with an empty
ALTER TABLEstatement for that table, e.g.:If running
sql-schema schemageneratesThen changing
INTtoTEXT(or anything else) and runningsql-schema migrationwill generate a migration with an emptyALTER TABLE foo(or nothing at all after #11 / v0.6.2).This is because the we're currently only comparing at the column name level and performing
DROP COLUMNorADD COLUMNoperations.For PostgreSQL, it should generate something like