for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
use yii\db\Migration;
/**
* Handles the creation of table `home`.
*/
class m180603_123208_create_home_table extends Migration
{
* {@inheritdoc}
public function safeUp()
$this->createTable('home',
[
'id' => $this->primaryKey(),
'title' => $this->string(128)->notNull(),
'description' => $this->text(),
'content' => $this->text(),
'metaKeys' => $this->string(128),
'metaDescription' => $this->string(),
'default' => $this->tinyInteger()->defaultValue(0),
'created_at' => $this->dateTime(),
'updated_at' => $this->dateTime(),
]
);
}
public function safeDown()
$this->dropTable('home');