setTableName('document_event'); $this->hasColumn('document_id', 'integer', null, array( 'type' => 'integer', 'notnull' => true, )); $this->hasColumn('zakaznik_id', 'integer', null, array( 'type' => 'integer', 'notnull' => true, )); $this->hasColumn('personalista_id', 'integer', null, array( 'type' => 'integer', )); $this->hasColumn('agentura_id', 'integer', null, array( 'type' => 'integer', )); $this->hasColumn('user_name', 'string', 255, array( 'type' => 'string', 'notnull' => true, 'length' => '255', )); $this->hasColumn('document_name', 'string', 255, array( 'type' => 'string', 'notnull' => true, 'length' => '255', )); $this->hasColumn('document_path', 'string', 255, array( 'type' => 'string', 'length' => '255', )); $this->hasColumn('action', 'string', 255, array( 'type' => 'string', 'values' => array( 0 => 'create', 1 => 'update', 2 => 'delete', ), '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('Zakaznik', array( 'local' => 'zakaznik_id', 'foreign' => 'id', 'onDelete' => 'CASCADE')); $this->hasOne('Agentura', array( 'local' => 'agentura_id', 'foreign' => 'id', 'onDelete' => 'NO ACTION')); $this->hasOne('Personalista', array( 'local' => 'personalista_id', 'foreign' => 'id', 'onDelete' => 'NO ACTION')); $timestampable0 = new Doctrine_Template_Timestampable(array( 'updated' => array( 'disabled' => true, ), )); $this->actAs($timestampable0); } }