schema() public static method

Returns the Schema registered for this class.
public static schema ( ) : Schema
return Schema
Ejemplo n.º 1
0
 public function setUp()
 {
     parent::setUp();
     // set up a domain object
     $this->initialize('Pheasant\\DomainObject', function ($builder) {
         $builder->properties(array('id' => new Types\IntegerType(null, 'primary auto_increment'), 'value' => new Types\StringType()));
     });
     // set up tables
     $this->pheasant->register('Pheasant\\DomainObject', new RowMapper('domainobject'));
     $this->migrate('domainobject', DomainObject::schema());
 }
Ejemplo n.º 2
0
 public function setUp()
 {
     parent::setUp();
     // set up a domain object
     $this->initialize('Pheasant\\DomainObject', function ($builder) {
         $builder->properties(array('id' => new Types\IntegerType(null, 'primary auto_increment'), 'type' => new Types\StringType(128), 'isllama' => new Types\BooleanType(array('default' => true)), 'weight' => new Types\DecimalType(5, 1), 'timecreated' => new Types\DateTimeType(), 'unixtime' => new Types\UnixTimestampType(), 'camelidvariant' => new Types\StringType(128, array('allowed' => array('llama', 'alpaca')))));
     });
     // set up tables
     $this->pheasant->register('Pheasant\\DomainObject', new RowMapper('domainobject'));
     $this->migrate('domainobject', DomainObject::schema());
 }