File tree Expand file tree Collapse file tree 5 files changed +33
-0
lines changed
snippets/tutorial/tutorial-series
part-1/files/acp/database
part-3/files/acp/database
part-4/files/acp/database
part-5/files/acp/database
part-6/files/acp/database Expand file tree Collapse file tree 5 files changed +33
-0
lines changed Original file line number Diff line number Diff line change 33use wcf \system \database \table \column \NotNullVarchar255DatabaseTableColumn ;
44use wcf \system \database \table \column \ObjectIdDatabaseTableColumn ;
55use wcf \system \database \table \DatabaseTable ;
6+ use wcf \system \database \table \index \DatabaseTablePrimaryIndex ;
67
78return [
89 DatabaseTable::create ('wcf1_person ' )
910 ->columns ([
1011 ObjectIdDatabaseTableColumn::create ('personID ' ),
1112 NotNullVarchar255DatabaseTableColumn::create ('firstName ' ),
1213 NotNullVarchar255DatabaseTableColumn::create ('lastName ' ),
14+ ])
15+ ->indices ([
16+ DatabaseTablePrimaryIndex::create ()
17+ ->columns (['personID ' ]),
1318 ]),
1419];
Original file line number Diff line number Diff line change 55use wcf \system \database \table \column \ObjectIdDatabaseTableColumn ;
66use wcf \system \database \table \column \SmallintDatabaseTableColumn ;
77use wcf \system \database \table \DatabaseTable ;
8+ use wcf \system \database \table \index \DatabaseTablePrimaryIndex ;
89
910return [
1011 DatabaseTable::create ('wcf1_person ' )
1718 ->notNull ()
1819 ->defaultValue (0 ),
1920 DefaultTrueBooleanDatabaseTableColumn::create ('enableComments ' ),
21+ ])
22+ ->indices ([
23+ DatabaseTablePrimaryIndex::create ()
24+ ->columns (['personID ' ]),
2025 ]),
2126];
Original file line number Diff line number Diff line change 55use wcf \system \database \table \column \ObjectIdDatabaseTableColumn ;
66use wcf \system \database \table \column \SmallintDatabaseTableColumn ;
77use wcf \system \database \table \DatabaseTable ;
8+ use wcf \system \database \table \index \DatabaseTablePrimaryIndex ;
89
910return [
1011 DatabaseTable::create ('wcf1_person ' )
1718 ->notNull ()
1819 ->defaultValue (0 ),
1920 DefaultTrueBooleanDatabaseTableColumn::create ('enableComments ' ),
21+ ])
22+ ->indices ([
23+ DatabaseTablePrimaryIndex::create ()
24+ ->columns (['personID ' ]),
2025 ]),
2126];
Original file line number Diff line number Diff line change 1010use wcf \system \database \table \column \VarcharDatabaseTableColumn ;
1111use wcf \system \database \table \DatabaseTable ;
1212use wcf \system \database \table \index \DatabaseTableForeignKey ;
13+ use wcf \system \database \table \index \DatabaseTablePrimaryIndex ;
1314
1415return [
1516 DatabaseTable::create ('wcf1_person ' )
2425 ->notNull ()
2526 ->defaultValue (0 ),
2627 DefaultTrueBooleanDatabaseTableColumn::create ('enableComments ' ),
28+ ])
29+ ->indices ([
30+ DatabaseTablePrimaryIndex::create ()
31+ ->columns (['personID ' ]),
2732 ]),
2833
2934 DatabaseTable::create ('wcf1_person_information ' )
4045 ->defaultValue ('' ),
4146 NotNullInt10DatabaseTableColumn::create ('time ' ),
4247 ])
48+ ->indices ([
49+ DatabaseTablePrimaryIndex::create ()
50+ ->columns (['informationID ' ]),
51+ ])
4352 ->foreignKeys ([
4453 DatabaseTableForeignKey::create ()
4554 ->columns (['personID ' ])
Original file line number Diff line number Diff line change 1010use wcf \system \database \table \column \VarcharDatabaseTableColumn ;
1111use wcf \system \database \table \DatabaseTable ;
1212use wcf \system \database \table \index \DatabaseTableForeignKey ;
13+ use wcf \system \database \table \index \DatabaseTablePrimaryIndex ;
1314
1415return [
1516 DatabaseTable::create ('wcf1_person ' )
2425 ->notNull ()
2526 ->defaultValue (0 ),
2627 DefaultTrueBooleanDatabaseTableColumn::create ('enableComments ' ),
28+ ])
29+ ->indices ([
30+ DatabaseTablePrimaryIndex::create ()
31+ ->columns (['personID ' ]),
2732 ]),
2833
2934 DatabaseTable::create ('wcf1_person_information ' )
4045 ->defaultValue ('' ),
4146 NotNullInt10DatabaseTableColumn::create ('time ' ),
4247 ])
48+ ->indices ([
49+ DatabaseTablePrimaryIndex::create ()
50+ ->columns (['informationID ' ]),
51+ ])
4352 ->foreignKeys ([
4453 DatabaseTableForeignKey::create ()
4554 ->columns (['personID ' ])
You can’t perform that action at this time.
0 commit comments