setTableName('document'); $this->hasColumn('zakaznik_id', 'integer', null, array( 'type' => 'integer', 'notnull' => true, )); $this->hasColumn('parent_id', 'integer', null, array( 'type' => 'integer', )); $this->hasColumn('kurz_id', 'integer', null, array( 'type' => 'integer', )); $this->hasColumn('beh_id', 'integer', null, array( 'type' => 'integer', )); $this->hasColumn('pracovnik_id', 'integer', null, array( 'type' => 'integer', )); $this->hasColumn('agentura_id', 'integer', null, array( 'type' => 'integer', )); $this->hasColumn('hodina_id', 'integer', null, array( 'type' => 'integer', )); $this->hasColumn('name', 'string', 255, array( 'type' => 'string', 'notnull' => true, 'length' => '255', )); $this->hasColumn('is_dir', 'boolean', null, array( 'type' => 'boolean', 'notnull' => true, 'default' => false, )); $this->hasColumn('is_global', 'boolean', null, array( 'type' => 'boolean', 'notnull' => true, 'default' => false, )); $this->hasColumn('filename', 'string', 255, array( 'type' => 'string', 'length' => '255', )); $this->hasColumn('agentura_read', 'boolean', null, array( 'type' => 'boolean', 'notnull' => true, 'default' => false, )); $this->hasColumn('agentura_write', 'boolean', null, array( 'type' => 'boolean', 'notnull' => true, 'default' => false, )); $this->option('type', 'InnoDB'); $this->option('collate', 'utf8_unicode_ci'); $this->option('charset', 'utf8'); } public function setUp() { parent::setUp(); $this->hasOne('Zakaznik', array( 'local' => 'zakaznik_id', 'foreign' => 'id', 'onDelete' => 'CASCADE')); $this->hasOne('Kurz', array( 'local' => 'kurz_id', 'foreign' => 'id', 'onDelete' => 'CASCADE')); $this->hasOne('Kurz_beh as Beh', array( 'local' => 'beh_id', 'foreign' => 'id', 'onDelete' => 'CASCADE')); $this->hasOne('Pracovnik', array( 'local' => 'pracovnik_id', 'foreign' => 'id', 'onDelete' => 'CASCADE')); $this->hasOne('Agentura', array( 'local' => 'agentura_id', 'foreign' => 'id', 'onDelete' => 'CASCADE')); $this->hasOne('Kurz_hodina as Hodina', array( 'local' => 'hodina_id', 'foreign' => 'id', 'onDelete' => 'CASCADE')); $timestampable0 = new Doctrine_Template_Timestampable(); $sluggable0 = new Doctrine_Template_Sluggable(array( 'fields' => array( 0 => 'name', ), 'unique' => true, 'builder' => array( 0 => 'saInflector', 1 => 'urlize', ), )); $this->actAs($timestampable0); $this->actAs($sluggable0); } }