Example #1
0
 /**
  * Generate the following table in the database, modifying whatever already exists
  * 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.
  * 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
  *     control over the index.
  */
 static function requireTable($table, $fieldSchema = null, $indexSchema = null)
 {
     return DB::$globalConn->requireTable($table, $fieldSchema, $indexSchema);
 }