This commit is contained in:
Dave Mc Nicoll committed 2020-11-27 12:21:10 -05:00
commit f74d1907d9
21 files changed
+759 -555

No files matched your search

+9 -1
View File
@@ -6,14 +6,22 @@ class Table implements \Ulmus\Annotation\Annotation {
public string $name;
public string $database;
public string $schema;
public string $adapter;
public string $engine;
public function __construct($name = null)
public function __construct($name = null, $engine = null)
{
if ( $name !== null ) {
$this->name = $name;
}
if ( $engine !== null ) {
$this->engine = $engine;
}
}
}
+5 -3
View File
@@ -7,19 +7,21 @@ class Field implements \Ulmus\Annotation\Annotation {
public string $type;
public string $name;
public int $length;
public int $precision;
public array $attributes = [];
public bool $nullable = false;
public function __construct(? string $type = null, ? int $length = null)
{
if ( $type !== null ) {
$this->type = $type;
}
if ( $length !== null ) {
$this->length = $length;
}
@@ -14,6 +14,7 @@ class ForeignKey extends Id {
unset($this->nullable);
$this->attributes['primary_key'] = false;
$this->attributes['auto_increment'] = false;
}
}