setTableName('gramatika'); $this->hasColumn('kod', 'string', 255, array( 'type' => 'string', 'notnull' => true, 'length' => '255', )); $this->hasColumn('popis', 'string', 255, array( 'type' => 'string', 'notnull' => true, 'length' => '255', )); $this->hasColumn('popis_full', 'clob', null, array( 'type' => 'clob', )); $this->hasColumn('hodnoceni_head_id', 'integer', null, array( 'type' => 'integer', 'notnull' => true, )); $this->hasColumn('jazyk_id', 'integer', null, array( 'type' => 'integer', )); $this->hasColumn('kategorie_id', 'integer', null, array( 'type' => 'integer', )); $this->hasColumn('priorita', 'integer', null, array( 'type' => 'integer', 'notnull' => true, 'default' => '100', )); $this->option('type', 'InnoDB'); $this->option('collate', 'utf8_unicode_ci'); $this->option('charset', 'utf8'); } public function setUp() { parent::setUp(); $this->hasOne('Hodnoceni_head', array( 'local' => 'hodnoceni_head_id', 'foreign' => 'id')); $this->hasOne('Jazyk_gramatiky as Jazyk', array( 'local' => 'jazyk_id', 'foreign' => 'id', 'onDelete' => 'CASCADE')); $this->hasOne('Kategorie_gramatiky as Kategorie', array( 'local' => 'kategorie_id', 'foreign' => 'id', 'onDelete' => 'CASCADE')); } }