add frontend ticket changes
This commit is contained in:
@@ -7,7 +7,11 @@ class m151008_065256_alter__table__ticket__add_columns extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
|
||||
$this->addColumn('ticket', 'id_card', 'int(11)');
|
||||
$this->alterColumn('ticket', 'start', 'dateTime' );
|
||||
$this->alterColumn('ticket', 'end', 'dateTime' );
|
||||
$this->alterColumn('ticket', 'created_at', 'dateTime' );
|
||||
$this->alterColumn('ticket', 'updated_at', 'dateTime' );
|
||||
}
|
||||
|
||||
public function down()
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Schema;
|
||||
use yii\db\Migration;
|
||||
|
||||
class m151008_101155_alter_table_ticket__alter__column_comment extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
$this->alterColumn('ticket', 'comment', 'varchar(255) null' );
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
echo "m151008_101155_alter_table_ticket__alter__column_comment cannot be reverted.\n";
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
// Use safeUp/safeDown to run migration code within a transaction
|
||||
public function safeUp()
|
||||
{
|
||||
}
|
||||
|
||||
public function safeDown()
|
||||
{
|
||||
}
|
||||
*/
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Schema;
|
||||
use yii\db\Migration;
|
||||
|
||||
class m151008_101334_alter_table_ticket__alter__columns__not_null extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
$this->alterColumn('ticket', 'id_user', 'int(11) not null' );
|
||||
$this->alterColumn('ticket', 'id_ticket_type', 'int(11) not null' );
|
||||
$this->alterColumn('ticket', 'id_account', 'int(11) not null' );
|
||||
$this->alterColumn('ticket', 'id_user', 'int(11) not null' );
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
echo "m151008_101334_alter_table_ticket__alter__columns__not_null 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