Skip to content

Commit

Permalink
DOC Document correct method signature for DB::require_table
Browse files Browse the repository at this point in the history
  • Loading branch information
maxime-rainville committed Oct 22, 2024
1 parent ebbd642 commit 9b8169f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/ORM/Connect/DBSchemaManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ protected function transInitTable($table)
* @param boolean $hasAutoIncPK A flag indicating that the primary key on this table is an autoincrement type
* @param array $options Create table options (ENGINE, etc.)
* @param array|bool $extensions List of extensions
* @return void
*/
public function requireTable(
$table,
Expand Down
11 changes: 6 additions & 5 deletions src/ORM/DB.php
Original file line number Diff line number Diff line change
Expand Up @@ -550,15 +550,16 @@ public static function create_field($table, $field, $spec)
* as necessary.
*
* @param string $table The name of the table
* @param string $fieldSchema A list of the fields to create, in the same form as DataObject::$db
* @param string $indexSchema A list of indexes to create. The keys of the array are the names of the index.
* @param array $fieldSchema|null A list of the fields to create, in the same form as DataObject::$db
* @param array $indexSchema|null A list of indexes to create. See {@link require_index()}
* The values of the array can be one of:
* - true: Create a single column index on the field named the same as the index.
* - array('fields' => array('A','B','C'), 'type' => 'index/unique/fulltext'): This gives you full
* - ['fields' => ['A','B','C'], 'type' => 'index/unique/fulltext']: This gives you full
* control over the index.
* @param boolean $hasAutoIncPK A flag indicating that the primary key on this table is an autoincrement type
* @param string $options SQL statement to append to the CREATE TABLE call.
* @param array $extensions List of extensions
* @param array|null $options Create table options (ENGINE, etc.)
* @param array|bool|null $extensions List of extensions
* @return void
*/
public static function require_table(
$table,
Expand Down

0 comments on commit 9b8169f

Please sign in to comment.