;
};
+ # Get all fields
+ $fields = [];
+ foreach ($this->fields() as $f) {
+ if (!empty($f->extras)) continue;
+ $fields[] = $f;
+ }
+
$sql = 'CREATE '.strtoupper($this->type()).' '.$this->sql_name()
.' ('
- .join(",",array_map(function($f) use ($_create) {return $_create($f);},array_values($this->fields())))
+ .join(",",array_map(function($f) use ($_create) {return $_create($f);},$fields))
# done at the end for primary keys .')'
;