guild/console/migrations/m190621_094843_add_balance.php
2019-06-21 18:05:58 +03:00

46 lines
792 B
PHP

<?php
use yii\db\Migration;
/**
* Class m190621_094843_add_balance
*/
class m190621_094843_add_balance extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->createTable('balance',[
'id' => $this->primaryKey(),
'type' => $this->integer(1),
'summ' => $this->integer(4),
'dt_add' => $this->integer(11),
]);
}
/**
* {@inheritdoc}
*/
public function safeDown()
{
$this->dropTable('balance');
}
/*
// Use up()/down() to run migration code without a transaction.
public function up()
{
}
public function down()
{
echo "m190621_094843_add_balance cannot be reverted.\n";
return false;
}
*/
}