Skip to content

Commit 30781aa

Browse files
author
igor-chepurnoi
committed
update migrations
1 parent d1a8fbd commit 30781aa

File tree

5 files changed

+12
-17
lines changed

5 files changed

+12
-17
lines changed

config/common.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,7 @@
88
'components' => [
99
'authManager' => [
1010
'class' => 'yii\rbac\DbManager',
11-
'defaultRoles' => ['guest', 'user'],
12-
'itemTable' => '{{%AuthItem}}',
13-
'itemChildTable' => '{{%AuthItemChild}}',
14-
'assignmentTable' => '{{%AuthAssignment}}',
15-
'ruleTable' => '{{%AuthRule}}',
11+
'defaultRoles' => ['guest', 'user']
1612
],
1713
'formatter' => [
1814
'class' => 'yii\i18n\Formatter',

config/main.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@
3030
'cookieValidationKey' => 'fYPq2eLM',
3131
],
3232
'session' => [
33-
'class' => 'yii\web\DbSession',
34-
'sessionTable' => '{{%Session}}',
33+
'class' => 'yii\web\DbSession'
3534
],
3635
'user' => [
3736
'identityClass' => 'app\models\UserModel',

migrations/m160805_074305_add_admin_user.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class m160805_074305_add_admin_user extends Migration
99
{
1010
public function up()
1111
{
12-
$this->insert('{{%User}}', [
12+
$this->insert('{{%user}}', [
1313
'username' => 'admin',
1414
'authKey' => Yii::$app->getSecurity()->generateRandomString(),
1515
'passwordHash' => Yii::$app->getSecurity()->generatePasswordHash(123123),
@@ -22,6 +22,6 @@ public function up()
2222

2323
public function down()
2424
{
25-
$this->delete('{{%User}}', ['email' => '[email protected]']);
25+
$this->delete('{{%user}}', ['email' => '[email protected]']);
2626
}
2727
}

migrations/m160805_074317_add_cms_pages.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class m160805_074317_add_cms_pages extends Migration
99
{
1010
public function up()
1111
{
12-
$this->insert('{{%Cms}}', [
12+
$this->insert('{{%cms}}', [
1313
'url' => 'about-us',
1414
'title' => 'About us',
1515
'content' => 'About us content',
@@ -20,7 +20,7 @@ public function up()
2020
'updatedAt' => time(),
2121
]);
2222

23-
$this->insert('{{%Cms}}', [
23+
$this->insert('{{%cms}}', [
2424
'url' => 'terms-and-conditions',
2525
'title' => 'Terms & Conditions',
2626
'content' => 'Content',
@@ -31,7 +31,7 @@ public function up()
3131
'updatedAt' => time(),
3232
]);
3333

34-
$this->insert('{{%Cms}}', [
34+
$this->insert('{{%cms}}', [
3535
'url' => 'privacy-policy',
3636
'title' => 'Privacy Policy',
3737
'content' => 'Content',
@@ -45,8 +45,8 @@ public function up()
4545

4646
public function down()
4747
{
48-
$this->delete('{{%Cms}}', ['url' => 'about-us']);
49-
$this->delete('{{%Cms}}', ['url' => 'terms-and-conditions']);
50-
$this->delete('{{%Cms}}', ['url' => 'privacy-policy']);
48+
$this->delete('{{%cms}}', ['url' => 'about-us']);
49+
$this->delete('{{%cms}}', ['url' => 'terms-and-conditions']);
50+
$this->delete('{{%cms}}', ['url' => 'privacy-policy']);
5151
}
5252
}

migrations/m160805_074616_create_session_table.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class m160805_074616_create_session_table extends Migration
99
{
1010
public function up()
1111
{
12-
$this->createTable('{{%Session}}', [
12+
$this->createTable('{{%session}}', [
1313
'id' => 'CHAR(40) NOT NULL PRIMARY KEY',
1414
'expire' => 'INTEGER',
1515
'data' => 'LONGBLOB'
@@ -18,6 +18,6 @@ public function up()
1818

1919
public function down()
2020
{
21-
$this->dropTable('{{%Session}}');
21+
$this->dropTable('{{%session}}');
2222
}
2323
}

0 commit comments

Comments
 (0)