mirror of https://github.com/agola-io/agola
![]() Sqlite provides only limited alter tables capabilities, complex things must be done by creating a new table and migrating the data. Things becomes more complex when other tables references the table being altered. For doing this the documentation provides a list of steps https://www.sqlite.org/lang_altertable.html#making_other_kinds_of_table_schema_changes The first stable is disabling foreign keys, but this must be done outside a transaction. This patch adds this to the migration logic: disable foreign keys outside transaction, check foreign keys before committing the transaction and then re enable them outside the transaction. |
||
---|---|---|
.. | ||
create.go | ||
export.go | ||
import.go | ||
manager.go | ||
migrate.go |