fitness-web/console/migrations/m160319_180510_update_ticket_count.php

33 lines
619 B
PHP

<?php
use yii\db\Schema;
use yii\db\Migration;
class m160319_180510_update_ticket_count extends Migration
{
public function up()
{
$this->execute("update ticket_type set max_usage_count = 10000;");
$this->execute( "update ticket set max_usage_count = 10000 , usage_count = 0" );
}
public function down()
{
echo "m160319_180510_update_ticket_count cannot be reverted.\n";
return false;
}
/*
// Use safeUp/safeDown to run migration code within a transaction
public function safeUp()
{
}
public function safeDown()
{
}
*/
}