<?php

class m180620_064551_add_new_fields_images_roi extends CDbMigration {

    public function up() {
        $this->execute('
            ALTER TABLE `eventserverdb`.`images_roi` 
                ADD COLUMN `event_id` INT(11) NOT NULL AFTER `image_id`,
                ADD COLUMN `src_image_type` VARCHAR(45) NOT NULL AFTER `event_id`;
            ');
    }

    public function down() {
        $this->execute('
                ALTER TABLE `eventserverdb_islanda`.`images_roi` 
                    DROP COLUMN `event_id`,
                    DROP COLUMN `src_image_type`;
            ');
    }

    /*
      // Use safeUp/safeDown to do migration with transaction
      public function safeUp()
      {
      }

      public function safeDown()
      {
      }
     */
}
