From: mutec Date: Mon, 7 Oct 2019 08:14:49 +0000 (+0200) Subject: fixed and added sql update instructions from WSC 3.1 X-Git-Tag: 5.2.0_RC_1~22^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c315cd2d36ca3dd67b2d1098e587c2c2c286e922;p=GitHub%2FWoltLab%2FWCF.git fixed and added sql update instructions from WSC 3.1 --- diff --git a/wcfsetup/install/files/acp/update-com.woltlab.wcf_5.2.php b/wcfsetup/install/files/acp/update-com.woltlab.wcf_5.2.php index f4cef76852..cf90936e0c 100644 --- a/wcfsetup/install/files/acp/update-com.woltlab.wcf_5.2.php +++ b/wcfsetup/install/files/acp/update-com.woltlab.wcf_5.2.php @@ -4,6 +4,7 @@ use wcf\system\database\table\column\CharDatabaseTableColumn; use wcf\system\database\table\column\DateDatabaseTableColumn; use wcf\system\database\table\column\DatetimeDatabaseTableColumn; use wcf\system\database\table\column\DefaultFalseBooleanDatabaseTableColumn; +use wcf\system\database\table\column\DefaultTrueBooleanDatabaseTableColumn; use wcf\system\database\table\column\EnumDatabaseTableColumn; use wcf\system\database\table\column\IntDatabaseTableColumn; use wcf\system\database\table\column\MediumtextDatabaseTableColumn; @@ -44,6 +45,11 @@ $tables = [ DefaultFalseBooleanDatabaseTableColumn::create('delta2'), DefaultFalseBooleanDatabaseTableColumn::create('delta3'), DefaultFalseBooleanDatabaseTableColumn::create('delta4') + ]) + ->indices([ + DatabaseTableIndex::create('day') + ->type(DatabaseTableIndex::UNIQUE_TYPE) + ->columns(['date']), ]), DatabaseTable::create('wcf1_blacklist_entry') @@ -79,11 +85,13 @@ $tables = [ DatabaseTable::create('wcf1_comment') ->columns([ MediumtextDatabaseTableColumn::create('message') + ->notNull() ]), DatabaseTable::create('wcf1_comment_response') ->columns([ MediumtextDatabaseTableColumn::create('message') + ->notNull() ]), DatabaseTable::create('wcf1_contact_attachment') @@ -109,13 +117,6 @@ $tables = [ DatabaseTable::create('wcf1_like') ->columns([ NotNullInt10DatabaseTableColumn::create('reactionTypeID') - ]) - ->foreignKeys([ - DatabaseTableForeignKey::create() - ->columns(['reactionTypeID']) - ->referencedTable('wcf1_reaction_type') - ->referencedColumns(['reactionTypeID']) - ->onDelete('CASCADE') ]), DatabaseTable::create('wcf1_like_object') @@ -154,7 +155,7 @@ $tables = [ ->defaultValue(0), NotNullVarchar255DatabaseTableColumn::create('iconFile') ->defaultValue(''), - DefaultFalseBooleanDatabaseTableColumn::create('isDisabled') + DefaultTrueBooleanDatabaseTableColumn::create('isAssignable') ]) ->indices([ DatabaseTablePrimaryIndex::create() @@ -164,7 +165,9 @@ $tables = [ DatabaseTable::create('wcf1_style') ->columns([ EnumDatabaseTableColumn::create('apiVersion') + ->notNull() ->enumValues(['3.0', '3.1', '5.2']) + ->defaultValue('3.0') ]), DatabaseTable::create('wcf1_trophy')