Rev 52
Update the structure of the online table.
This commit is contained in:
parent
abeebd4897
commit
ead1441bf7
4 changed files with 35 additions and 7 deletions
|
@ -833,7 +833,7 @@ class Install extends Admin
|
||||||
$schema = [
|
$schema = [
|
||||||
'FIELDS' => [
|
'FIELDS' => [
|
||||||
'user_id' => ['INT(10) UNSIGNED', false, 0],
|
'user_id' => ['INT(10) UNSIGNED', false, 0],
|
||||||
'ident' => ['VARCHAR(190)', false, ''],
|
'ident' => ['VARCHAR(45)', false, ''],
|
||||||
'logged' => ['INT(10) UNSIGNED', false, 0],
|
'logged' => ['INT(10) UNSIGNED', false, 0],
|
||||||
'last_post' => ['INT(10) UNSIGNED', false, 0],
|
'last_post' => ['INT(10) UNSIGNED', false, 0],
|
||||||
'last_search' => ['INT(10) UNSIGNED', false, 0],
|
'last_search' => ['INT(10) UNSIGNED', false, 0],
|
||||||
|
@ -841,11 +841,10 @@ class Install extends Admin
|
||||||
'o_name' => ['VARCHAR(190)', false, ''],
|
'o_name' => ['VARCHAR(190)', false, ''],
|
||||||
],
|
],
|
||||||
'UNIQUE KEYS' => [
|
'UNIQUE KEYS' => [
|
||||||
'user_id_ident_idx' => ['user_id', 'ident(45)'],
|
'user_id_ident_idx' => ['user_id', 'ident'],
|
||||||
],
|
],
|
||||||
'INDEXES' => [
|
'INDEXES' => [
|
||||||
'ident_idx' => ['ident'],
|
'logged_idx' => ['logged'],
|
||||||
'logged_idx' => ['logged'],
|
|
||||||
],
|
],
|
||||||
'ENGINE' => $this->DBEngine,
|
'ENGINE' => $this->DBEngine,
|
||||||
];
|
];
|
||||||
|
|
|
@ -25,7 +25,7 @@ class Update extends Admin
|
||||||
{
|
{
|
||||||
const PHP_MIN = '7.3.0';
|
const PHP_MIN = '7.3.0';
|
||||||
const REV_MIN_FOR_UPDATE = 42;
|
const REV_MIN_FOR_UPDATE = 42;
|
||||||
const LATEST_REV_WITH_DB_CHANGES = 51;
|
const LATEST_REV_WITH_DB_CHANGES = 52;
|
||||||
const LOCK_NAME = 'lock_update';
|
const LOCK_NAME = 'lock_update';
|
||||||
const LOCk_TTL = 1800;
|
const LOCk_TTL = 1800;
|
||||||
const JSON_OPTIONS = \JSON_UNESCAPED_SLASHES | \JSON_UNESCAPED_UNICODE | \JSON_THROW_ON_ERROR;
|
const JSON_OPTIONS = \JSON_UNESCAPED_SLASHES | \JSON_UNESCAPED_UNICODE | \JSON_THROW_ON_ERROR;
|
||||||
|
@ -774,4 +774,33 @@ class Update extends Admin
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* rev.51 to rev.52
|
||||||
|
*/
|
||||||
|
protected function stageNumber51(array $args): ?int
|
||||||
|
{
|
||||||
|
$this->c->DB->dropTable('::online');
|
||||||
|
|
||||||
|
$schema = [
|
||||||
|
'FIELDS' => [
|
||||||
|
'user_id' => ['INT(10) UNSIGNED', false, 0],
|
||||||
|
'ident' => ['VARCHAR(45)', false, ''],
|
||||||
|
'logged' => ['INT(10) UNSIGNED', false, 0],
|
||||||
|
'last_post' => ['INT(10) UNSIGNED', false, 0],
|
||||||
|
'last_search' => ['INT(10) UNSIGNED', false, 0],
|
||||||
|
'o_position' => ['VARCHAR(100)', false, ''],
|
||||||
|
'o_name' => ['VARCHAR(190)', false, ''],
|
||||||
|
],
|
||||||
|
'UNIQUE KEYS' => [
|
||||||
|
'user_id_ident_idx' => ['user_id', 'ident'],
|
||||||
|
],
|
||||||
|
'INDEXES' => [
|
||||||
|
'logged_idx' => ['logged'],
|
||||||
|
],
|
||||||
|
];
|
||||||
|
$this->c->DB->createTable('::online', $schema);
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,7 +58,7 @@ if (
|
||||||
$c->BASE_URL = \str_replace('https://', 'http://', $c->BASE_URL);
|
$c->BASE_URL = \str_replace('https://', 'http://', $c->BASE_URL);
|
||||||
}
|
}
|
||||||
|
|
||||||
$c->FORK_REVISION = 51;
|
$c->FORK_REVISION = 52;
|
||||||
$c->START = $forkStart;
|
$c->START = $forkStart;
|
||||||
$c->PUBLIC_URL = $c->BASE_URL . $forkPublicPrefix;
|
$c->PUBLIC_URL = $c->BASE_URL . $forkPublicPrefix;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# ForkBB rev.51 Alpha Readme
|
# ForkBB rev.52 Alpha Readme
|
||||||
|
|
||||||
## About
|
## About
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue