Skip to content

Commit

Permalink
不添加测试用户了
Browse files Browse the repository at this point in the history
  • Loading branch information
xutl committed Sep 11, 2017
1 parent 8baebde commit f22d1df
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 31 deletions.
16 changes: 0 additions & 16 deletions migrations/M161108090738Create_user_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,6 @@ public function safeUp()
'created_at' => $this->integer()->unsigned()->notNull(),
'updated_at' => $this->integer()->unsigned()->notNull(),
], $tableOptions);

//添加默认超级管理员帐户 密码是 123456
$this->insert('{{%user}}', [
'id' => 1,
'slug' => 'xcr',
'username' => '方圆百里找对手',
'email' => 'xutongle@gmail.com',
'mobile' => '13800138000',
'auth_key' => '0B8C1dRH1XxKhO15h_9JzaN0OAY9WprZ',
'password_hash' => '$2y$13$BzPeMPVIFLkiZXwkjJ/HZu0o6Mk0EUQdePC0ufnpzJCzIb4sOrUKK',
'email_confirmed_at' => time(),
'mobile_confirmed_at' => time(),
'created_at' => time(),
'updated_at' => time(),
]);

}

public function safeDown()
Expand Down
11 changes: 0 additions & 11 deletions migrations/M161108090824Create_user_profile_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,6 @@ public function safeUp()
], $tableOptions);
$this->addPrimaryKey('{{%user_profile}}', '{{%user_profile}}', 'user_id');
$this->addForeignKey('{{%user_profile_ibfk_1}}', '{{%user_profile}}', 'user_id', '{{%user}}', 'id', 'CASCADE', 'RESTRICT');

$this->insert('{{%user_profile}}', [
'user_id' => 1,
'gender' => 1,
'mobile' => '13800138000',
'email' => 'admin@qq.com',
'country' => 'CN',
'province' => 'Shandong',
'city' => 'Jinan',
'website' => 'https://www.l68.net',
]);
}

public function safeDown()
Expand Down
4 changes: 0 additions & 4 deletions migrations/M161111023247Create_user_extend_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ public function safeUp()
], $tableOptions);
$this->addPrimaryKey('{{%user_extend}}','{{%user_extend}}','user_id');
$this->addForeignKey('{{%user_extend_ibfk_1}}', '{{%user_extend}}', 'user_id', '{{%user}}', 'id', 'CASCADE', 'RESTRICT');

$this->insert('{{%user_extend}}', [
'user_id' => 1,
]);
}

public function safeDown()
Expand Down

0 comments on commit f22d1df

Please sign in to comment.