mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-25 04:27:22 +08:00
add uid starts when install
This commit is contained in:
@@ -79,3 +79,5 @@ SFTP_USERNAME=
|
|||||||
SFTP_PASSWORD=
|
SFTP_PASSWORD=
|
||||||
SFTP_PORT=
|
SFTP_PORT=
|
||||||
SFTP_ROOT=/tmp
|
SFTP_ROOT=/tmp
|
||||||
|
|
||||||
|
UID_STARTS=10001
|
||||||
|
|||||||
@@ -16,8 +16,12 @@ class CreateUsersTable extends Migration
|
|||||||
if (Schema::hasTable('users')) {
|
if (Schema::hasTable('users')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Schema::create('users', function (Blueprint $table) {
|
$uidStarts = env('UID_STARTS');
|
||||||
$table->id('id')->startingValue(10001);
|
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('username', 40)->default('')->unique('username');
|
||||||
$table->string('passhash', 32)->default('');
|
$table->string('passhash', 32)->default('');
|
||||||
$table->binary('secret');
|
$table->binary('secret');
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ class Install
|
|||||||
'TIMEZONE',
|
'TIMEZONE',
|
||||||
'DB_HOST', 'DB_PORT', 'DB_USERNAME', 'DB_PASSWORD', 'DB_DATABASE',
|
'DB_HOST', 'DB_PORT', 'DB_USERNAME', 'DB_PASSWORD', 'DB_DATABASE',
|
||||||
'REDIS_HOST', 'REDIS_PORT', 'REDIS_DB', 'REDIS_PASSWORD',
|
'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'];
|
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