mirror of
https://gitee.com/apiadmin/ApiAdmin.git
synced 2025-04-06 03:58:00 +08:00
modified 完善安装流程
This commit is contained in:
parent
daf1d965e7
commit
8a3727c40a
@ -20,7 +20,7 @@ class Install extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* php think apiadmin:install --db mysql://root:123456@127.0.0.1:3306/apiadmin2#utf8
|
* php think apiadmin:install --db mysql://root:123456@127.0.0.1:3306/apiadmin#utf8
|
||||||
* @param Input $input
|
* @param Input $input
|
||||||
* @param Output $output
|
* @param Output $output
|
||||||
* @return int|void|null
|
* @return int|void|null
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
|
|
||||||
use think\migration\Migrator;
|
use think\migration\Migrator;
|
||||||
|
|
||||||
class AdminUser extends Migrator
|
class AdminUser extends Migrator {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* Change Method.
|
* Change Method.
|
||||||
*
|
*
|
||||||
@ -76,6 +75,7 @@ class AdminUser extends Migrator
|
|||||||
'comment' => '账号状态 0封号 1正常'
|
'comment' => '账号状态 0封号 1正常'
|
||||||
])->addColumn('openid', 'string', [
|
])->addColumn('openid', 'string', [
|
||||||
'limit' => 100,
|
'limit' => 100,
|
||||||
|
'null' => true,
|
||||||
'default' => '',
|
'default' => '',
|
||||||
'comment' => '三方登录唯一ID'
|
'comment' => '三方登录唯一ID'
|
||||||
])->addIndex(['create_time'])->create();
|
])->addIndex(['create_time'])->create();
|
||||||
|
@ -45,6 +45,6 @@ class IniAdminUser extends Migrator {
|
|||||||
$this->table('admin_user')->insert($data)->saveData();
|
$this->table('admin_user')->insert($data)->saveData();
|
||||||
|
|
||||||
$lockFile = Env::get('app_path') . 'install' . DIRECTORY_SEPARATOR . 'lock.php';
|
$lockFile = Env::get('app_path') . 'install' . DIRECTORY_SEPARATOR . 'lock.php';
|
||||||
file_put_contents($lockFile, "username:{root}, password:{{$pass}}");
|
file_put_contents($lockFile, "username:root, password:{$pass}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user