mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-03 14:10:57 +08:00
add uid starts when install
This commit is contained in:
@@ -79,3 +79,5 @@ SFTP_USERNAME=
|
||||
SFTP_PASSWORD=
|
||||
SFTP_PORT=
|
||||
SFTP_ROOT=/tmp
|
||||
|
||||
UID_STARTS=10001
|
||||
|
||||
@@ -16,8 +16,12 @@ class CreateUsersTable extends Migration
|
||||
if (Schema::hasTable('users')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
$table->id('id')->startingValue(10001);
|
||||
$uidStarts = env('UID_STARTS');
|
||||
if (!is_numeric($uidStarts) || $uidStarts < 1) {
|
||||
$uidStarts = 10001;
|
||||
}
|
||||
Schema::create('users', function (Blueprint $table) use ($uidStarts) {
|
||||
$table->id('id')->startingValue($uidStarts);
|
||||
$table->string('username', 40)->default('')->unique('username');
|
||||
$table->string('passhash', 32)->default('');
|
||||
$table->binary('secret');
|
||||
|
||||
@@ -28,6 +28,7 @@ class Install
|
||||
'TIMEZONE',
|
||||
'DB_HOST', 'DB_PORT', 'DB_USERNAME', 'DB_PASSWORD', 'DB_DATABASE',
|
||||
'REDIS_HOST', 'REDIS_PORT', 'REDIS_DB', 'REDIS_PASSWORD',
|
||||
'UID_STARTS',
|
||||
];
|
||||
|
||||
protected array $requiredExtensions = ['ctype', 'curl', 'fileinfo', 'json', 'mbstring', 'openssl', 'pdo_mysql', 'tokenizer', 'xml', 'mysqli', 'bcmath', 'redis', 'gd', 'gmp'];
|
||||
|
||||
Reference in New Issue
Block a user