immigrant-generator-postgres 0.2.0

Immigrant migrations generator for postgres SQL dialect
Documentation
!!!TEST "two scalars: a and b"
scalar b "b" = sql"TEXT";
scalar a "a" = sql"TEXT";
!!!UPDATE scalar b is renamed to c, scalar a is dropped, and table is created in its place
scalar b "c" = sql"TEXT";
table A "a" {
	field: b;
};
!!!RESULT
-- updated: "two scalars: a and b" --
CREATE DOMAIN b AS TEXT;
CREATE DOMAIN a AS TEXT;
-- updated: scalar b is renamed to c, scalar a is dropped, and table is created in its place --
ALTER DOMAIN a
	RENAME TO moveaway_1
;
ALTER DOMAIN b
	RENAME TO c
;
CREATE TABLE a (
	field c NOT NULL
);
DROP DOMAIN moveaway_1;
-- updated: cleanup schema changes --
DROP TABLE a;
DROP DOMAIN c;