add ticket usage count increment trigger, add log, fix card flag update query, fix customer card move update
This commit is contained in:
32
console/migrations/m160319_180510_update_ticket_count.php
Normal file
32
console/migrations/m160319_180510_update_ticket_count.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?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()
|
||||
{
|
||||
}
|
||||
*/
|
||||
}
|
||||
Reference in New Issue
Block a user