public function __construct(DeclareSchema $schema, $name = 'id', $type = 'integer') { parent::__construct($schema, $name); $this->type($type)->isa('int')->notNull()->unsigned()->primary()->autoIncrement()->renderAs('HiddenInput'); }
public function __construct() { parent::__construct('id'); $this->isa('int')->integer()->notNull()->primary()->autoIncrement(); }
/** * TODO: the best type for UUID in mysql is BINARY(36). */ public function __construct($name = 'uuid', $type = 'char', $length = 36) { parent::__construct($name); $this->type($type)->isa('str')->length($length)->notNull()->primary(); }