Skip to content
Permalink
Browse files

Fix sqlite fixture generation

  • Loading branch information...
dereuromark committed May 9, 2015
1 parent fa24100 commit 47cad96da0cf5765de3e2105b5b714de96feb931
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/Database/Schema/SqliteSchema.php
@@ -253,13 +253,17 @@ public function columnSql(Table $table, $name)
if (in_array($data['type'], $hasUnsigned, true) &&
isset($data['unsigned']) && $data['unsigned'] === true
) {
$out .= ' UNSIGNED';
if ($data['type'] !== 'integer' || [$name] !== (array)$table->primaryKey()) {
$out .= ' UNSIGNED';
}
}
$out .= $typeMap[$data['type']];
$hasLength = ['integer', 'string'];
if (in_array($data['type'], $hasLength, true) && isset($data['length'])) {
$out .= '(' . (int)$data['length'] . ')';
if ($data['type'] !== 'integer' || [$name] !== (array)$table->primaryKey()) {
$out .= '(' . (int)$data['length'] . ')';
}
}
$hasPrecision = ['float', 'decimal'];
if (in_array($data['type'], $hasPrecision, true) &&

0 comments on commit 47cad96

Please sign in to comment.
You can’t perform that action at this time.