add contract started_at field

This commit is contained in:
2016-03-03 07:57:17 +01:00
parent b2c1cc0a6d
commit fd4122a983
13 changed files with 222 additions and 16 deletions

View File

@@ -0,0 +1,31 @@
<?php
use yii\db\Schema;
use yii\db\Migration;
class m160302_171507_alter__table__contract__add__column__started_at extends Migration
{
public function up()
{
$this->addColumn("contract", "started_at", "datetime");
$this->execute("update contract set started_at = created_at");
}
public function down()
{
echo "m160302_171507_alter__table__contract__add__column__started_at cannot be reverted.\n";
return false;
}
/*
// Use safeUp/safeDown to run migration code within a transaction
public function safeUp()
{
}
public function safeDown()
{
}
*/
}