Skip to content

Commit 6fee0ef

Browse files
committed
Make wcf1_trophy.title and wcf1_trophy.type not null
1 parent f7fc503 commit 6fee0ef

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

wcfsetup/install/files/acp/database/update_com.woltlab.wcf_6.3_step1.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,20 @@
99
*/
1010

1111
use wcf\system\database\table\column\DefaultFalseBooleanDatabaseTableColumn;
12+
use wcf\system\database\table\column\NotNullVarchar255DatabaseTableColumn;
13+
use wcf\system\database\table\column\SmallintDatabaseTableColumn;
1214
use wcf\system\database\table\PartialDatabaseTable;
1315

1416
return [
1517
PartialDatabaseTable::create('wcf1_label_group')
1618
->columns([
1719
DefaultFalseBooleanDatabaseTableColumn::create('sortAlphabetically')
1820
]),
21+
PartialDatabaseTable::create('wcf1_trophy')
22+
->columns([
23+
NotNullVarchar255DatabaseTableColumn::create('title'),
24+
SmallintDatabaseTableColumn::create('type')
25+
->notNull()
26+
->defaultValue(1),
27+
]),
1928
];

wcfsetup/install/files/lib/data/trophy/Trophy.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424
* @since 3.1
2525
*
2626
* @property-read int $trophyID unique id for the trophy
27-
* @property-read ?string $title
27+
* @property-read string $title
2828
* @property-read ?string $description
2929
* @property-read int $categoryID
30-
* @property-read ?int $type
30+
* @property-read int $type
3131
* @property-read ?string $iconFile
3232
* @property-read ?string $iconName
3333
* @property-read ?string $iconColor

wcfsetup/setup/db/install_com.woltlab.wcf.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3659,11 +3659,11 @@
36593659
DatabaseTable::create('wcf1_trophy')
36603660
->columns([
36613661
ObjectIdDatabaseTableColumn::create('trophyID'),
3662-
VarcharDatabaseTableColumn::create('title')
3663-
->length(255),
3662+
NotNullVarchar255DatabaseTableColumn::create('title'),
36643663
MediumtextDatabaseTableColumn::create('description'),
36653664
NotNullInt10DatabaseTableColumn::create('categoryID'),
36663665
SmallintDatabaseTableColumn::create('type')
3666+
->notNull()
36673667
->defaultValue(1),
36683668
MediumtextDatabaseTableColumn::create('iconFile'),
36693669
VarcharDatabaseTableColumn::create('iconName')

0 commit comments

Comments
 (0)