<?php

use yii\db\Schema;
use yii\db\Migration;

class m160418_180010_update_ticket_field_count_move_out extends Migration
{
    public function up()
    {
		$this->execute(" update ticket set count_move_out = GREATEST(usage_count,0) ");
    }

    public function down()
    {
        echo "m160418_180010_update_ticket_field_count_move_out cannot be reverted.\n";

        return false;
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
