mirror of
https://github.com/modoboa/modoboa.git
synced 2026-04-27 01:45:58 +03:00
[GH-ISSUE #442] upgrade from 0.9.4 or earlier to 1.0.0 fails on database migration #424
Labels
No labels
bug
bug
dependencies
design
documentation
duplicate
enhancement
enhancement
enhancement
feedback-needed
help-needed
help-needed
installer
invalid
looking-for-sponsors
modoboa-contacts
new-ui
new-ui
pr
pull-request
pyconfr
python
question
security
stale
webmail
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/modoboa-modoboa#424
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tonioo on GitHub (Dec 4, 2013).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/442
Originally assigned to: @tonioo on GitHub.
Originally created by Louis-Dominique Dubeau on 2013-08-07T14:26:50Z
h1. Expected behavior
Upgrading from 0.9.4 to 1.0.0 should work without issue.
(See: https://groups.google.com/d/msg/modoboa-users/j-y7YP3RmRA/IEy0mwkeNyYJ)
h1. Actual behavior
h1. How to reproduce
Try to migrate a 0.9.4 or earlier to 1.0.0.
h1. Observations
admin/migrations/0021_default_superadmin_ownership.py
(There are other old migrations using lib/compat.py.)
It is introduced in 0.9.5. When run against a 0.9.4 installation, it will access the database using the new method. However, the table renaming that make the new method effective does not occur until the following migration:
admin/migrations/0029_auto__add_user__chg_field_mailbox_user__chg_field_objectaccess_user.py
So 0021_default_superadmin_ownership erroneously tries to access tables that do not exist yet.
h1. Workaround
I've copied the admin/migrations/0021_default_superadmin_ownership.py file from 0.9.5 over the one in 1.0.0. This allowed the migration to proceed. Someone migrating from an older version than 0.9.4 (which is probably inadvisable) might have to do more work.
@tonioo commented on GitHub (Dec 4, 2013):
Posted by Antoine Nguyen on 2013-08-31T15:28:42Z
Applied in changeset commit:2b3349749bfd44e42a40518223b0aec1ce14848b.