[RFC] Migrations

These requests for comments/change have lead to an implemented feature that has been successfully merged into the 3.1/Ascraeus branch. Everything listed in this forum will be available in phpBB 3.1.
Post Reply
User avatar
MichaelC
Development Team
Development Team
Posts: 889
Joined: Thu Jan 28, 2010 6:29 pm

Re: [RFC] Migrations

Post by MichaelC »

I'm -1 automagic backups as large databases can take a long time to backup and take up a lot of space.
Blitze wrote:How about a board setting like so:

Backup database before installing/uninstalling extensions?
  • Yes (Recommended)
    • Prompt
    • save locally
  • No
With No = 0, Prompt = 1, and save = 2, or something like that. This way, the user can decide what's best for his/her board
+1
Formerly known as Unknown Bliss
psoTFX wrote: I went with Olympus because as I said to the teams ... "It's been one hell of a hill to climb"
No unsolicited PMs please except for quotes.

User avatar
RMcGirr83
Registered User
Posts: 360
Joined: Fri Mar 09, 2007 1:51 am
Contact:

Re: [RFC] Migrations

Post by RMcGirr83 »

Maybe have it state what the size of the database is also?
Do not hire Christian Bullock he won't finish the job and will keep your money

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC] Migrations

Post by imkingdavid »

Two more migrations-related PRs have been merged (extensions installation and language strings). The remaining migrations PR, which constains the bulk of the actual migrations themselves, is awaiting a rebase and we need to make sure it includes all database_update.php changes. Once that is done, we need to run both the migrations update and the database_update.php update and make sure they both result in the same database structure/data.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

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

Re: [RFC] Migrations

Post by EXreaction »


User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC] Migrations

Post by imkingdavid »

Thanks for the reminder. Done.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

Blitze
Registered User
Posts: 17
Joined: Thu Feb 22, 2007 5:08 pm

Re: [RFC] Migrations

Post by Blitze »

Does the module tool work for extensions currently?

Say I have an extension my/test with a module info file (test_info.php) that looks something like this:

Code: Select all

class phpbb_ext_my_test_acp_test_info
{
	function module()
	{
		return array(
			'filename'	=> 'test_module',
			'title'		=> 'ACP_TEST',
			'version'	=> '1.0.0',
			'modes'		=> array(
				'test'		=> array('title' => 'TEST', 'auth' => '', 'cat' => array('SOME_CAT')),
			),
		);
	}
}
and the migration file has the following:

Code: Select all

class phpbb_ext_my_test_migrations_data extends phpbb_db_migration
{
	public function update_data()
	{
		return array(
			array('module.add', array('acp', 'SOME_CAT', array(
					'module_basename'	=> 'phpbb_ext_my_test_acp_test_module',
				),
			)),
		);
	}
}
This fails with error message "missing info file acp/info/..."

I'm I doing something wrong? Is this a bug?

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

Re: [RFC] Migrations

Post by EXreaction »

Actually I believe that happens because the code was not designed to load info files from extensions, only the main ones in includes/. Please open a ticket in the bug tracker and I'll try to get that resolved.

Blitze
Registered User
Posts: 17
Joined: Thu Feb 22, 2007 5:08 pm

Re: [RFC] Migrations

Post by Blitze »

Ok thanks

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC] Migrations

Post by imkingdavid »

Main migrations data PR merged.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

User avatar
oddfish
Registered User
Posts: 110
Joined: Tue Mar 27, 2007 5:53 am
Location: on my way home
Contact:

Re: [RFC] Migrations

Post by oddfish »

A problem upgrading from today's build on mysqli ..

Code: Select all

Fatal error: Cannot redeclare class phpbb_db_migration_data_30x_3_0_3_rc1 in /quickinstall/boards/30231/includes/db/migration/data/30x/3_0_3_rc1.php on line 83

Post Reply