From 472ee0d7ad9ab10d1bb93b96c2cf13389b10437c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 3 Dec 2021 16:06:58 +0100 Subject: [PATCH] Specify explicit DatabaseTablePrimaryIndex in install_com.woltlab.wcf.people.php --- .../acp/database/install_com.woltlab.wcf.people.php | 5 +++++ .../acp/database/install_com.woltlab.wcf.people.php | 5 +++++ .../acp/database/install_com.woltlab.wcf.people.php | 5 +++++ .../acp/database/install_com.woltlab.wcf.people.php | 9 +++++++++ .../acp/database/install_com.woltlab.wcf.people.php | 9 +++++++++ 5 files changed, 33 insertions(+) diff --git a/snippets/tutorial/tutorial-series/part-1/files/acp/database/install_com.woltlab.wcf.people.php b/snippets/tutorial/tutorial-series/part-1/files/acp/database/install_com.woltlab.wcf.people.php index 57b341b5..e3b11455 100644 --- a/snippets/tutorial/tutorial-series/part-1/files/acp/database/install_com.woltlab.wcf.people.php +++ b/snippets/tutorial/tutorial-series/part-1/files/acp/database/install_com.woltlab.wcf.people.php @@ -3,6 +3,7 @@ use wcf\system\database\table\column\NotNullVarchar255DatabaseTableColumn; use wcf\system\database\table\column\ObjectIdDatabaseTableColumn; use wcf\system\database\table\DatabaseTable; +use wcf\system\database\table\index\DatabaseTablePrimaryIndex; return [ DatabaseTable::create('wcf1_person') @@ -10,5 +11,9 @@ return [ ObjectIdDatabaseTableColumn::create('personID'), NotNullVarchar255DatabaseTableColumn::create('firstName'), NotNullVarchar255DatabaseTableColumn::create('lastName'), + ]) + ->indices([ + DatabaseTablePrimaryIndex::create() + ->columns(['personID']), ]), ]; diff --git a/snippets/tutorial/tutorial-series/part-3/files/acp/database/install_com.woltlab.wcf.people.php b/snippets/tutorial/tutorial-series/part-3/files/acp/database/install_com.woltlab.wcf.people.php index 895cbe52..ef9f1e29 100644 --- a/snippets/tutorial/tutorial-series/part-3/files/acp/database/install_com.woltlab.wcf.people.php +++ b/snippets/tutorial/tutorial-series/part-3/files/acp/database/install_com.woltlab.wcf.people.php @@ -5,6 +5,7 @@ use wcf\system\database\table\column\NotNullVarchar255DatabaseTableColumn; use wcf\system\database\table\column\ObjectIdDatabaseTableColumn; use wcf\system\database\table\column\SmallintDatabaseTableColumn; use wcf\system\database\table\DatabaseTable; +use wcf\system\database\table\index\DatabaseTablePrimaryIndex; return [ DatabaseTable::create('wcf1_person') @@ -17,5 +18,9 @@ return [ ->notNull() ->defaultValue(0), DefaultTrueBooleanDatabaseTableColumn::create('enableComments'), + ]) + ->indices([ + DatabaseTablePrimaryIndex::create() + ->columns(['personID']), ]), ]; diff --git a/snippets/tutorial/tutorial-series/part-4/files/acp/database/install_com.woltlab.wcf.people.php b/snippets/tutorial/tutorial-series/part-4/files/acp/database/install_com.woltlab.wcf.people.php index 895cbe52..ef9f1e29 100644 --- a/snippets/tutorial/tutorial-series/part-4/files/acp/database/install_com.woltlab.wcf.people.php +++ b/snippets/tutorial/tutorial-series/part-4/files/acp/database/install_com.woltlab.wcf.people.php @@ -5,6 +5,7 @@ use wcf\system\database\table\column\NotNullVarchar255DatabaseTableColumn; use wcf\system\database\table\column\ObjectIdDatabaseTableColumn; use wcf\system\database\table\column\SmallintDatabaseTableColumn; use wcf\system\database\table\DatabaseTable; +use wcf\system\database\table\index\DatabaseTablePrimaryIndex; return [ DatabaseTable::create('wcf1_person') @@ -17,5 +18,9 @@ return [ ->notNull() ->defaultValue(0), DefaultTrueBooleanDatabaseTableColumn::create('enableComments'), + ]) + ->indices([ + DatabaseTablePrimaryIndex::create() + ->columns(['personID']), ]), ]; diff --git a/snippets/tutorial/tutorial-series/part-5/files/acp/database/install_com.woltlab.wcf.people.php b/snippets/tutorial/tutorial-series/part-5/files/acp/database/install_com.woltlab.wcf.people.php index 5d737157..03041e68 100644 --- a/snippets/tutorial/tutorial-series/part-5/files/acp/database/install_com.woltlab.wcf.people.php +++ b/snippets/tutorial/tutorial-series/part-5/files/acp/database/install_com.woltlab.wcf.people.php @@ -10,6 +10,7 @@ use wcf\system\database\table\column\TextDatabaseTableColumn; use wcf\system\database\table\column\VarcharDatabaseTableColumn; use wcf\system\database\table\DatabaseTable; use wcf\system\database\table\index\DatabaseTableForeignKey; +use wcf\system\database\table\index\DatabaseTablePrimaryIndex; return [ DatabaseTable::create('wcf1_person') @@ -24,6 +25,10 @@ return [ ->notNull() ->defaultValue(0), DefaultTrueBooleanDatabaseTableColumn::create('enableComments'), + ]) + ->indices([ + DatabaseTablePrimaryIndex::create() + ->columns(['personID']), ]), DatabaseTable::create('wcf1_person_information') @@ -40,6 +45,10 @@ return [ ->defaultValue(''), NotNullInt10DatabaseTableColumn::create('time'), ]) + ->indices([ + DatabaseTablePrimaryIndex::create() + ->columns(['informationID']), + ]) ->foreignKeys([ DatabaseTableForeignKey::create() ->columns(['personID']) diff --git a/snippets/tutorial/tutorial-series/part-6/files/acp/database/install_com.woltlab.wcf.people.php b/snippets/tutorial/tutorial-series/part-6/files/acp/database/install_com.woltlab.wcf.people.php index 5d737157..03041e68 100644 --- a/snippets/tutorial/tutorial-series/part-6/files/acp/database/install_com.woltlab.wcf.people.php +++ b/snippets/tutorial/tutorial-series/part-6/files/acp/database/install_com.woltlab.wcf.people.php @@ -10,6 +10,7 @@ use wcf\system\database\table\column\TextDatabaseTableColumn; use wcf\system\database\table\column\VarcharDatabaseTableColumn; use wcf\system\database\table\DatabaseTable; use wcf\system\database\table\index\DatabaseTableForeignKey; +use wcf\system\database\table\index\DatabaseTablePrimaryIndex; return [ DatabaseTable::create('wcf1_person') @@ -24,6 +25,10 @@ return [ ->notNull() ->defaultValue(0), DefaultTrueBooleanDatabaseTableColumn::create('enableComments'), + ]) + ->indices([ + DatabaseTablePrimaryIndex::create() + ->columns(['personID']), ]), DatabaseTable::create('wcf1_person_information') @@ -40,6 +45,10 @@ return [ ->defaultValue(''), NotNullInt10DatabaseTableColumn::create('time'), ]) + ->indices([ + DatabaseTablePrimaryIndex::create() + ->columns(['informationID']), + ]) ->foreignKeys([ DatabaseTableForeignKey::create() ->columns(['personID']) -- 2.20.1