add Notes
This commit is contained in:
31
console/migrations/m191205_092846_create_note_table.php
Normal file
31
console/migrations/m191205_092846_create_note_table.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
/**
|
||||
* Handles the creation of table `{{%notes}}`.
|
||||
*/
|
||||
class m191205_092846_create_note_table extends Migration
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function safeUp()
|
||||
{
|
||||
$this->createTable('note', [
|
||||
'id' => $this->primaryKey(),
|
||||
'name' => $this->string()->notNull(),
|
||||
'description' => $this->text(),
|
||||
'created_at' => $this->dateTime(),
|
||||
'updated_at' => $this->dateTime(),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function safeDown()
|
||||
{
|
||||
$this->dropTable('note');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user