Browse Source

Update m170907_052038_rbac_add_index_on_auth_assignment_user_id.php (#16272)

When the authManager DB Connection is not the default one the migration fails
tags/2.0.16
Andres Felipe Solarte López 6 years ago committed by Alexander Makarov
parent
commit
b933d61861
  1. 4
      framework/rbac/migrations/m170907_052038_rbac_add_index_on_auth_assignment_user_id.php

4
framework/rbac/migrations/m170907_052038_rbac_add_index_on_auth_assignment_user_id.php

@ -42,6 +42,8 @@ class m170907_052038_rbac_add_index_on_auth_assignment_user_id extends Migration
public function up()
{
$authManager = $this->getAuthManager();
$this->db = $authManager->db;
$this->createIndex($this->index, $authManager->assignmentTable, $this->column);
}
@ -51,6 +53,8 @@ class m170907_052038_rbac_add_index_on_auth_assignment_user_id extends Migration
public function down()
{
$authManager = $this->getAuthManager();
$this->db = $authManager->db;
$this->dropIndex($this->index, $authManager->assignmentTable);
}
}

Loading…
Cancel
Save