Skip to content

Commit f1023e9

Browse files
committed
fix
1 parent bc7638a commit f1023e9

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/migrations/m171129_120101_rbacp_user.php renamed to src/migrations/m171129_120101_user.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
use yii\db\Schema;
44

5-
class m171129_120101_rbacp_user extends \yii\db\Migration
5+
class m171129_120101_user extends \yii\db\Migration
66
{
77
public function up()
88
{
@@ -11,7 +11,7 @@ public function up()
1111
$tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB';
1212
}
1313

14-
$this->createTable('rbacp_user', [
14+
$this->createTable('user', [
1515
'id' => Schema::TYPE_PK,
1616
'username' => sprintf("%s(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '%s'", Schema::TYPE_STRING, '用户名'),
1717
'auth_key' => sprintf("%s(32) COLLATE utf8_unicode_ci NOT NULL COMMENT '%s'", Schema::TYPE_STRING, '授权密钥'),
@@ -25,7 +25,7 @@ public function up()
2525
], $tableOptions);
2626

2727
$this->batchInsert(
28-
$table = 'rbacp_user',
28+
$table = 'user',
2929
$columns = [
3030
'id',
3131
'username',
@@ -69,6 +69,6 @@ public function up()
6969

7070
public function down()
7171
{
72-
$this->dropTable('rbacp_user');
72+
$this->dropTable('user');
7373
}
7474
}

src/models/UserView.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ public function rules()
3434
public function attributeLabels()
3535
{
3636
return [
37-
'createDefaultTable' => Yii::t('app', '生成默认用户表(rbacp_user)'),
38-
'table' => Yii::t('app', '原始数据库中需要映射的"表名"字段(rbacp_user)'),
37+
'createDefaultTable' => Yii::t('app', '生成默认用户表(user)'),
38+
'table' => Yii::t('app', '原始数据库中需要映射的"表名"字段(user)'),
3939
'id' => Yii::t('app', ' rbacp_user_view中的"用户ID"字段(id)'),
4040
'username' => Yii::t('app', ' rbacp_user_view中的"用户名称"字段(username)'),
4141
'status' => Yii::t('app', ' rbacp_user_view中的"用户状态"字段(status)'),

src/views/default/migrate-up.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
\myzero1\adminlteiframe\gii\GiiAsset::register($this);
1111

12-
$model->table = "rbacp_user";
12+
$model->table = "user";
1313
$model->id = "id";
1414
$model->username = "username";
1515
$model->status = "status";

0 commit comments

Comments
 (0)