Could you try it without quickinstall?
This error has been coming up in travis but we've not been able to reproduce it, so if we can figure out how to reproduce it I can fix it.
[RFC] Migrations
- oddfish
- Registered User
- Posts: 110
- Joined: Tue Mar 27, 2007 5:53 am
- Location: on my way home
- Contact:
Re: [RFC] Migrations
Error also on a standalone install and update.
You need to change 3_0_3-rc1 for the the
After that you'll run into another issue - follow your nose on the rest.
You need to change 3_0_3-rc1 for the the
depends_on
(change it to 3_0_2) and again 3_0_8 (change that to 307-rc2). After that you'll run into another issue - follow your nose on the rest.
- EXreaction
- Registered User
- Posts: 1555
- Joined: Sat Sep 10, 2005 2:15 am
Re: [RFC] Migrations
Are you running the latest develop?
3.0.3-rc1:
3.0.8:
3.0.3-rc1:
Code: Select all
static public function depends_on()
{
return array('phpbb_db_migration_data_30x_3_0_2');
}
Code: Select all
static public function depends_on()
{
return array('phpbb_db_migration_data_30x_3_0_8_rc1');
}
- oddfish
- Registered User
- Posts: 110
- Joined: Tue Mar 27, 2007 5:53 am
- Location: on my way home
- Contact:
Re: [RFC] Migrations
EDIT: yes, running the latest from yesterday.
I'm thinking it is due to rc causing the issue which is why I suggested those changes initially.
Will keep combining rc's into each release to see if I can get a positive upgrade.
I'm thinking it is due to rc causing the issue which is why I suggested those changes initially.
Will keep combining rc's into each release to see if I can get a positive upgrade.
Re: [RFC] Migrations
There is nothing more frustrating for a user than trying to install an extension and running into errors. So I think the module tool needs to be more forgiving.
Consider the following code to add 2 categories and one module from an extension:
Keeping in mind that users have the ability to add/edit/delete modules in acp, I have the following thoughts:
1. Currently, if you run this and the 'Blog' category already exists, it will throw an exception. I think the migrator should instead get the id and use it rather than complain that it already exists. This offers more flexibility as an extension author can simply specify a category and if it exists we add the module mode to it, if not we create it, since the user could have deleted the target category. If the specified combination of category and module already exists, we might throw an exception here.
2. When uninstalling an extension like the one above that created module categories, you get an error that xyz module could not be removed, ie the categories. I think it should check for children and if it doesn't have any, the category should be removed, starting from the deepest one of course.
3. If you try to uninstall an extension and the user had removed or renamed one of the module categories you get an exception. I think it should look for the module and if it's not there, it should simply move on, and may be display a list of modules it could not find or something like that
What do ya all think?
Consider the following code to add 2 categories and one module from an extension:
Code: Select all
public function update_data ()
{
return array(
// add Blog category
array('module.add', array('acp', 0, 'Blog')),
// add Settings category
array('module.add', array('acp', 'Blog', 'Settings')),
// add Posting module
array('module.add', array('acp', 'Settings', array(
'module_basename' => 'phpbb_ext_blitze_blog_acp_posting_module',
),
)),
);
}
1. Currently, if you run this and the 'Blog' category already exists, it will throw an exception. I think the migrator should instead get the id and use it rather than complain that it already exists. This offers more flexibility as an extension author can simply specify a category and if it exists we add the module mode to it, if not we create it, since the user could have deleted the target category. If the specified combination of category and module already exists, we might throw an exception here.
2. When uninstalling an extension like the one above that created module categories, you get an error that xyz module could not be removed, ie the categories. I think it should check for children and if it doesn't have any, the category should be removed, starting from the deepest one of course.
3. If you try to uninstall an extension and the user had removed or renamed one of the module categories you get an exception. I think it should look for the module and if it's not there, it should simply move on, and may be display a list of modules it could not find or something like that
What do ya all think?
- EXreaction
- Registered User
- Posts: 1555
- Joined: Sat Sep 10, 2005 2:15 am
Re: [RFC] Migrations
Currently Migrations is very strict because we thought it was safer to let users deal with database issues (with support of course) than attempt to handle it automatically, which can lead to completely unknown states of installations in the database.
I understand there can be an issue with module categories as you explained. For module categories I believe it would be safe to ignore existing categories when adding them and ignore errors of unremovable categories (because of children) when removing them. Please open a bug ticket for this.
About other parts in general, I think what might be good is to support warnings for recoverable issues, such as non-existent modules when removing the module. Please open a separate ticket for this. This will probably be dealt with a little later (before 3.1.0) as we should wait and see how often issues come up due to the strictness.
I understand there can be an issue with module categories as you explained. For module categories I believe it would be safe to ignore existing categories when adding them and ignore errors of unremovable categories (because of children) when removing them. Please open a bug ticket for this.
About other parts in general, I think what might be good is to support warnings for recoverable issues, such as non-existent modules when removing the module. Please open a separate ticket for this. This will probably be dealt with a little later (before 3.1.0) as we should wait and see how often issues come up due to the strictness.
Re: [RFC] Migrations
Blitze wrote:1. Currently, if you run this and the 'Blog' category already exists, it will throw an exception.
i think if a module already exists it should be dealt with like umil currently does. it fails, but it is a handled exception so the result is nicely shown in the umil result screen.EXreaction wrote:Currently Migrations is very strict because we thought it was safer to let users deal with database issues (with support of course) than attempt to handle it automatically, which can lead to completely unknown states of installations in the database.
- oddfish
- Registered User
- Posts: 110
- Joined: Tue Mar 27, 2007 5:53 am
- Location: on my way home
- Contact:
Re: [RFC] Migrations
Using today's build (notifications) ..
Can install on apache.
Can't install cleanly or update on nginx. An install runs up to sub-final when
Ignoring the error, the board seems useable since the database is populated to a point.
Comparing the 2 databases, missing (on nginx) are Migrations table and
Can install on apache.
Can't install cleanly or update on nginx. An install runs up to sub-final when
redeclare class phpbb_db_migration_data_30x_3_0_3_rc1
error is thrown.Ignoring the error, the board seems useable since the database is populated to a point.
Comparing the 2 databases, missing (on nginx) are Migrations table and
questionnaire_unique_id
in config.- EXreaction
- Registered User
- Posts: 1555
- Joined: Sat Sep 10, 2005 2:15 am
Re: [RFC] Migrations
Please open a bug ticket for the missing config setting.
I'm working on a solution now, we just ran into this problem when trying to update area51, so it must be some sort of configuration setting that's causing the issue.
I'm working on a solution now, we just ran into this problem when trying to update area51, so it must be some sort of configuration setting that's causing the issue.
- oddfish
- Registered User
- Posts: 110
- Joined: Tue Mar 27, 2007 5:53 am
- Location: on my way home
- Contact:
Re: [RFC] Migrations
Done.
http://tracker.phpbb.com/browse/PHPBB3-11382
EDIT: the missing entry is for sending statistical information after install completes (thanks David).
http://tracker.phpbb.com/browse/PHPBB3-11382
EDIT: the missing entry is for sending statistical information after install completes (thanks David).