Changeset 4693
- Timestamp:
- 07/18/08 02:21:12 (5 months ago)
- Files:
-
- 1 modified
-
branches/1.0/lib/Doctrine/Export.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.0/lib/Doctrine/Export.php
r4358 r4693 287 287 public function createTable($name, array $fields, array $options = array()) 288 288 { 289 // Build array of the primary keys if any of the individual field definitions 290 // specify primary => true 291 $count = 0; 292 foreach ($fields as $fieldName => $field) { 293 if (isset($field['primary']) && $field['primary']) { 294 if ($count == 0) { 295 $options['primary'] = array(); 296 } 297 $count++; 298 $options['primary'][] = $fieldName; 299 } 300 } 301 289 302 $sql = (array) $this->createTableSql($name, $fields, $options); 290 303