New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid rbac migration m180523_151638_rbac_updates_indexes_without_prefix #17685
Comments
The workaround is obvious:
//...
'container' => [
'definitions' => [
'm180523_151638_rbac_updates_indexes_without_prefix' => [
'class' => 'm180523_151638_rbac_updates_indexes_without_prefix',
'db' => 'proper_db_component'
],
]
],
//... But I think it's not good. It's better to fix migration than to override migration's db component in every app which uses non-default db component. |
rvkulikov
changed the title
Invalid migration
Invalid rbac migration m180523_151638_rbac_updates_indexes_without_prefix
Nov 25, 2019
m180523_151638_rbac_updates_indexes_without_prefix
@rvkulikov do you want to prepare a pull request? |
@samdark OK. |
rvkulikov
added a commit
to rvkulikov/yii2
that referenced
this issue
Nov 26, 2019
rvkulikov
added a commit
to rvkulikov/yii2
that referenced
this issue
Nov 29, 2019
samdark
added a commit
that referenced
this issue
Nov 29, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What steps will reproduce the problem?
(tl;dr):
Look at the following lines:
yii2/framework/rbac/migrations/m140506_102106_rbac_init.php
Line 52 in 9431012
yii2/framework/rbac/migrations/m170907_052038_rbac_add_index_on_auth_assignment_user_id.php
Line 45 in 9431012
yii2/framework/rbac/migrations/m180523_151638_rbac_updates_indexes_without_prefix.php
Lines 39 to 48 in 9431012
Third migration uses default db component (which may be different from authManager's db component). And if you use 2 db components, and authManager (DbManager) uses non-default
db
component, then third migration will just fail (it is good fortune that it just drops some indexes).Please tell if it's not clear how to reproduce the problem and I'll write more details.
The text was updated successfully, but these errors were encountered: