Skip to content

Commit c15d5fb

Browse files
committed
Update database structure
1 parent 7262978 commit c15d5fb

File tree

3 files changed

+12
-21
lines changed

3 files changed

+12
-21
lines changed

wcfsetup/install/files/acp/database/update_com.woltlab.wcf_6.2.php

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,11 @@
88
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
99
*/
1010

11-
use wcf\system\database\table\column\DefaultFalseBooleanDatabaseTableColumn;
1211
use wcf\system\database\table\column\IntDatabaseTableColumn;
13-
use wcf\system\database\table\column\NotNullInt10DatabaseTableColumn;
1412
use wcf\system\database\table\column\NotNullVarchar255DatabaseTableColumn;
1513
use wcf\system\database\table\DatabaseTable;
1614
use wcf\system\database\table\index\DatabaseTableForeignKey;
17-
use wcf\system\database\table\index\DatabaseTableIndex;
15+
use wcf\system\database\table\index\DatabaseTablePrimaryIndex;
1816
use wcf\system\database\table\PartialDatabaseTable;
1917

2018
return [
@@ -52,22 +50,17 @@
5250
->referencedColumns(['fileID'])
5351
->onDelete('SET NULL'),
5452
]),
55-
PartialDatabaseTable::create('wcf1_user_rank')
56-
->columns([
57-
DefaultFalseBooleanDatabaseTableColumn::create('isMultilingual'),
58-
]),
5953
DatabaseTable::create('wcf1_user_rank_content')
6054
->columns([
61-
NotNullInt10DatabaseTableColumn::create('rankID'),
55+
IntDatabaseTableColumn::create('rankID')
56+
->notNull(),
6257
IntDatabaseTableColumn::create('languageID')
63-
->defaultValue(null),
64-
NotNullVarchar255DatabaseTableColumn::create('title')
65-
->defaultValue(''),
58+
->notNull(),
59+
NotNullVarchar255DatabaseTableColumn::create('title'),
6660
])
6761
->indices([
68-
DatabaseTableIndex::create('id')
69-
->columns(['rankID', 'languageID'])
70-
->type(DatabaseTableIndex::UNIQUE_TYPE),
62+
DatabaseTablePrimaryIndex::create()
63+
->columns(['rankID', 'languageID']),
7164
])
7265
->foreignKeys([
7366
DatabaseTableForeignKey::create()

wcfsetup/install/files/lib/data/user/rank/UserRank.class.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
* @property-read int $repeatImage number of times the rank image is displayed
2626
* @property-read int $requiredGender numeric representation of the user's gender required for the user rank (see `UserProfile::GENDER_*` constants) or 0 if no specific gender is required
2727
* @property-read int $hideTitle hides the generic title of the rank, but not custom titles, `0` to show the title at all times
28-
* @property-read int $isMultilingual
2928
*/
3029
class UserRank extends DatabaseObject implements ITitledObject
3130
{

wcfsetup/setup/db/install.sql

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1957,16 +1957,15 @@ CREATE TABLE wcf1_user_rank (
19571957
rankImage VARCHAR(255) NOT NULL DEFAULT '',
19581958
repeatImage TINYINT(3) NOT NULL DEFAULT 1,
19591959
requiredGender TINYINT(1) NOT NULL DEFAULT 0,
1960-
hideTitle TINYINT(1) NOT NULL DEFAULT 0,
1961-
isMultilingual TINYINT(1) NOT NULL DEFAULT 0
1960+
hideTitle TINYINT(1) NOT NULL DEFAULT 0
19621961
);
19631962

19641963
DROP TABLE IF EXISTS wcf1_user_rank_content;
19651964
CREATE TABLE wcf1_user_rank_content (
1966-
rankID INT(10) NOT NULL,
1967-
languageID INT(10) DEFAULT NULL,
1968-
title VARCHAR(255) NOT NULL DEFAULT '',
1969-
UNIQUE KEY id (rankID, languageID)
1965+
rankID INT NOT NULL,
1966+
languageID INT NOT NULL,
1967+
title VARCHAR(255) NOT NULL,
1968+
PRIMARY KEY (rankID, languageID)
19701969
);
19711970

19721971
DROP TABLE IF EXISTS wcf1_user_session;

0 commit comments

Comments
 (0)