|
|
@@ -407,10 +407,19 @@ class Sqlite extends DboSource {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
- if (isset($column['key']) && $column['key'] === 'primary' && $type === 'integer') {
|
|
|
+ $isPrimary = (isset($column['key']) && $column['key'] === 'primary');
|
|
|
+ if ($isPrimary && $type === 'integer') {
|
|
|
return $this->name($name) . ' ' . $this->columns['primary_key']['name'];
|
|
|
}
|
|
|
- return parent::buildColumn($column);
|
|
|
+ $out = parent::buildColumn($column);
|
|
|
+ if ($isPrimary && $type === 'biginteger') {
|
|
|
+ $replacement = 'PRIMARY KEY';
|
|
|
+ if ($column['null'] === false) {
|
|
|
+ $replacement = 'NOT NULL ' . $replacement;
|
|
|
+ }
|
|
|
+ return str_replace($this->columns['primary_key']['name'], $replacement, $out);
|
|
|
+ }
|
|
|
+ return $out;
|
|
|
}
|
|
|
|
|
|
/**
|