Specify explicit DatabaseTablePrimaryIndex in install_com.woltlab.wcf.people.php
authorTim Düsterhus <duesterhus@woltlab.com>
Fri, 3 Dec 2021 15:06:58 +0000 (16:06 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Fri, 3 Dec 2021 15:06:58 +0000 (16:06 +0100)
snippets/tutorial/tutorial-series/part-1/files/acp/database/install_com.woltlab.wcf.people.php
snippets/tutorial/tutorial-series/part-3/files/acp/database/install_com.woltlab.wcf.people.php
snippets/tutorial/tutorial-series/part-4/files/acp/database/install_com.woltlab.wcf.people.php
snippets/tutorial/tutorial-series/part-5/files/acp/database/install_com.woltlab.wcf.people.php
snippets/tutorial/tutorial-series/part-6/files/acp/database/install_com.woltlab.wcf.people.php

index 57b341b5599c08034f0a43443b8b3d7a1b2472aa..e3b11455531f4c2d1f78cdaa02480a934242f850 100644 (file)
@@ -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']),
         ]),
 ];
index 895cbe52780adf19395fa027a0c859d1f96cad92..ef9f1e298d834703a3dc93472c92b54c9471eb0e 100644 (file)
@@ -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']),
         ]),
 ];
index 895cbe52780adf19395fa027a0c859d1f96cad92..ef9f1e298d834703a3dc93472c92b54c9471eb0e 100644 (file)
@@ -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']),
         ]),
 ];
index 5d737157a03f3378fc1ac8df6357f3afa0491f7f..03041e68e0afe4e41305b783948de31dbab5a0c8 100644 (file)
@@ -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'])
index 5d737157a03f3378fc1ac8df6357f3afa0491f7f..03041e68e0afe4e41305b783948de31dbab5a0c8 100644 (file)
@@ -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'])