News for hackers. Stuff that matters.
Re:Declarative Schemas for simpler database management by skybrian on Thursday April 03, 2025 @02:45PM (#43573723)
It seems like generating the diffs from the schema's version history is equivalent to doing it the opposite way, provided that each diff is tested to make sure the database upgrade works. Not all diffs will correspond to feasible database upgrades, so some patches would have to be rejected.
Re:Declarative Schemas for simpler database management by pounderstanding on Thursday April 03, 2025 @04:09PM (#43574749)
Migrations give more control.

    Alter table foo add column bar;
    Update foo set bar=baz;
    Alter table foo modify column bar NOT NULL;
Re:Declarative Schemas for simpler database management by skybrian on Thursday April 03, 2025 @04:39PM (#43575089)
True. Perhaps annotating the schema would help for simple things?
Re:Declarative Schemas for simpler database management by bootsmann on Thursday April 03, 2025 @04:59PM (#43575329)
Not all migrations are as simple as adding and removing columns.