[Koha-bugs] [Bug 27880] Store each database migrations state in database

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jul 4 09:44:44 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27880

--- Comment #18 from Julian Maurice <julian.maurice at biblibre.com> ---
(In reply to Katrin Fischer from comment #16)
> Hm, you pretend like sequence of execution does not matter, but indeed it
> does. A FK can only be added to a table that already exists, a column can
> only be added AFTER another column that is already there etc. The sequence
> and the way we sometimes need to shift data make it necessary that even if
> updates are idempotent or only run once, the sequence plays a role.

Sequence does matter indeed. But there are several different valid sequences of
execution.
You can't write a migration to add a FK to a table before the migration to add
the table has been written, so the timestamp for the FK migration will always
be after the timestamp for the table migration. So these two migrations will
always be executed in the correct order.
But if you have a migration that adds a column to table A and another migration
that adds a column to table B, the order of execution of these two migrations
does not matter.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list