"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:

"Migration effectively installed"

Post by Oleg » Tue Mar 26, 2013 4:20 am

What does that offer that could not have been achieved with recording which migrations have been run without actually running them?

User avatar
bantu
3.0 Release Manager
3.0 Release Manager
Posts: 557
Joined: Thu Sep 07, 2006 11:22 am
Location: Karlsruhe, Germany
Contact:

Re: "Migration effectively installed"

Post by bantu » Fri Mar 29, 2013 11:26 pm

Bump.

User avatar
naderman
Product Manager
Product Manager
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany
Contact:

Re: "Migration effectively installed"

Post by naderman » Sat Mar 30, 2013 11:16 pm

Would be great to get some documentation on this as it was not in the original RFC.

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

Re: "Migration effectively installed"

Post by EXreaction » Mon Apr 01, 2013 4:13 pm

Code: Select all

	/**
	* Allows you to check if the migration is effectively installed (entirely optional)
	*
	* This is checked when a migration is installed. If true is returned, the migration will be set as
	* installed without performing the database changes.
	* This function is intended to help moving to migrations from a previous database updater, where some
	* migrations may have been installed already even though they are not yet listed in the migrations table.
	*
	* @return bool True if this migration is installed, False if this migration is not installed (checked on install)
	*/

User avatar
naderman
Product Manager
Product Manager
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany
Contact:

Re: "Migration effectively installed"

Post by naderman » Fri Apr 12, 2013 11:50 am

Thank you!

Oleg
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am
Contact:

Re: "Migration effectively installed"

Post by Oleg » Wed Apr 17, 2013 3:10 am

Documentation is good to have but does not answer the question posed in the first post.

User avatar
naderman
Product Manager
Product Manager
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany
Contact:

Re: "Migration effectively installed"

Post by naderman » Sat Apr 20, 2013 5:26 pm

Oleg wrote:What does that offer that could not have been achieved with recording which migrations have been run without actually running them?
The way I understand the documentation is that this is exactly what effectively installed is used for. To figure out which migrations need to be on the record without having been run based on the current state of the database. Once the migration system has been installed as part of the update this information is no longer necessary, as the records of run migrations are then sufficient.

Oleg
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am
Contact:

Re: "Migration effectively installed"

Post by Oleg » Sun Apr 21, 2013 3:32 am

A the other way of achieving the same effect, which works on all databases and is generally much simpler to implement, is to record a migration without running it.

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

Re: "Migration effectively installed"

Post by EXreaction » Sun Apr 21, 2013 3:13 pm

That's exactly what happens if effectively installed is evaluated to true.

User avatar
naderman
Product Manager
Product Manager
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany
Contact:

Re: "Migration effectively installed"

Post by naderman » Mon Apr 29, 2013 11:42 am

The purpose of the function is to identify which migrations need to be recorded without running them.

Post Reply