setTableName('price_unit'); $this->hasColumn('name', 'string', 255, array( 'type' => 'string', 'notnull' => true, 'length' => 255, )); $this->hasColumn('reals_id', 'integer', null, array( 'type' => 'integer', 'notnull' => false, )); $this->option('collate', 'utf8_czech_ci'); $this->option('charset', 'utf8'); } public function setUp() { parent::setUp(); $this->hasMany('Estate as Estates', array( 'local' => 'id', 'foreign' => 'price_unit_id')); } }