"Migration effectively installed"
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.
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.
"Migration effectively installed"
What does that offer that could not have been achieved with recording which migrations have been run without actually running them?
Re: "Migration effectively installed"
Would be great to get some documentation on this as it was not in the original RFC.
- EXreaction
- Registered User
- Posts: 1555
- Joined: Sat Sep 10, 2005 2:15 am
Re: "Migration effectively installed"
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)
*/
Re: "Migration effectively installed"
Documentation is good to have but does not answer the question posed in the first post.
Re: "Migration effectively installed"
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 wrote:What does that offer that could not have been achieved with recording which migrations have been run without actually running them?
Re: "Migration effectively installed"
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.
- EXreaction
- Registered User
- Posts: 1555
- Joined: Sat Sep 10, 2005 2:15 am
Re: "Migration effectively installed"
That's exactly what happens if effectively installed is evaluated to true.
Re: "Migration effectively installed"
The purpose of the function is to identify which migrations need to be recorded without running them.