guild/console/migrations/m221108_135514_create_document_template_table.php
2022-11-10 16:00:43 +03:00

33 lines
712 B
PHP

<?php
use yii\db\Migration;
/**
* Handles the creation of table `{{%document_template}}`.
*/
class m221108_135514_create_document_template_table extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->createTable('{{%document_template}}', [
'id' => $this->primaryKey(),
'title' => $this->string(),
'template_body' => $this->text(),
'status' => $this->integer(),
'created_at' => $this->dateTime(),
'updated_at' => $this->dateTime(),
]);
}
/**
* {@inheritdoc}
*/
public function safeDown()
{
$this->dropTable('{{%document_template}}');
}
}