add Notes

This commit is contained in:
Leorne
2019-12-05 15:05:33 +03:00
parent 2279783ca8
commit f7177975a8
16 changed files with 521 additions and 2 deletions

View 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');
}
}