"Migration effectively installed"

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The next feature release of phpBB 3 will be 3.2/Rhea followed by 3.3.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.1. If you need support for phpBB 3.1 please visit the 3.1.x Support Forum on phpbb.com.

If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
Oleg
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am
Contact:

Re: "Migration effectively installed"

Post by Oleg » Mon Apr 29, 2013 7:38 pm

Yes I get that.

The other option is:

1. Record all 3.0 migrations as having been run. Because we assume they have been.

2. Whenever admins manually change the database, give them a way to manually record a migration status as having been run. For any migration. Plus an undo of this functionality.

(3. Delete everything that tries to figure out if a migration has been applied.)

User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: "Migration effectively installed"

Post by EXreaction » Tue Apr 30, 2013 3:14 pm

I was originally doing something like that, but there are some significant problems when it comes to performing an update. If a user tries to update from not-the-latest 3.0.x, it would need to run the appropriate migrations to do so. If the user is updating from a version of 3.0.x than is newer than the 3.1.x version they are trying to use, it would have no idea that the 3.0.x version even exists, so we'd need to make a 3.1.x release at the same time a 3.0.x release is made.

There is also the problem of users updating and installing extensions that were previously installed as mods and having to update the database appropriately from whatever version they were at to whatever version they are trying to install.

If someone is going to manually alter the database they can easily insert a new row in the migrations table themselves.

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1731
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: "Migration effectively installed"

Post by DavidIQ » Thu May 02, 2013 2:45 pm

Why not just require the forum planning to update to have the latest 3.0.x version installed? If they don't then the migrations would be skipped.
Image

User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: "Migration effectively installed"

Post by EXreaction » Thu May 02, 2013 8:25 pm

That still only solves some of the problem, mods/extension authors would be left to figure out a solution on their own, meaning they'd probably need to implement the same idea; everyone wanting to upgrade to 3.1 and still use a mod (which may become an extension) would be required to update to a certain version or the latest version of a mod (which may not be validated or even exist after some period of time) _before_ upgrading to 3.1 (their update scripts may not be compatible with the 3.1 codebase, so it would need to be done first).

Also, if we did that, we would be leaving it up to the board owners to read and follow the instructions (which they may not do and which would make the upgrade process even longer and more challenging). This would almost certainly lead to some number of people trying to update and then having a completely screwed up database that can only manually be fixed with (a lot of) support.

Post Reply