"Migration effectively installed"

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The current feature release of phpBB 3 is 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.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 »

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 »

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: 1904
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: "Migration effectively installed"

Post by DavidIQ »

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 »

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