-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
The generated migrations will always add a statement for setting the default value of an inherited column (which has a default value set), even though it changes nothing and even does it if a previous migration already includes the statement.
Steps To Reproduce
- Create empty folder and go through
trek init - Open the model in pgmodeler
- Add schema
schemaname - Add table
schemaname.table1 - Add column
blatotable1with some type and some default value - Run
trek generate migrationname(important because of bug Failure after creating 2 tables with an inheritance relation #19 ) - Add
schemaname.table2 - Add inheritance relation from table2 to table1
- Validate and save
- Run
trek generate --stdout
Relevant log output
--
create table "schemaname"."table2" (
"bla" smallint default 1
) inherits ("schemaname"."tablename");
-- Statements generated automatically, please review:
ALTER TABLE schemaname.table2 OWNER TO databaseuser;
ALTER TABLE ONLY schemaname.table2 ALTER COLUMN bla SET DEFAULT 1;
--Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working