setTableName('plan_level'); $this->hasColumn('plan_id', 'integer', null, array( 'type' => 'integer', 'notnull' => true, )); $this->hasColumn('position', 'integer', null, array( 'type' => 'integer', 'notnull' => true, 'default' => '1', )); $this->hasColumn('name', 'string', 255, array( 'type' => 'string', 'notnull' => true, 'length' => '255', )); $this->option('type', 'InnoDB'); $this->option('collate', 'utf8_unicode_ci'); $this->option('charset', 'utf8'); } public function setUp() { parent::setUp(); $this->hasOne('Plan', array( 'local' => 'plan_id', 'foreign' => 'id', 'onDelete' => 'CASCADE')); $this->hasMany('PlanPracovnik as PlanPracovnikRelations', array( 'local' => 'id', 'foreign' => 'level_id')); $this->hasMany('PlanKurz as PlanKurzRelations', array( 'local' => 'id', 'foreign' => 'level_id')); $timestampable0 = new Doctrine_Template_Timestampable(); $this->actAs($timestampable0); } }