guild/console/migrations/m221108_135514_create_document_template_table.php

33 lines
712 B
PHP
Raw Permalink Normal View History

2022-11-08 18:01:42 +03:00
<?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(),
2022-11-10 16:00:43 +03:00
'template_body' => $this->text(),
'status' => $this->integer(),
'created_at' => $this->dateTime(),
'updated_at' => $this->dateTime(),
2022-11-08 18:01:42 +03:00
]);
}
/**
* {@inheritdoc}
*/
public function safeDown()
{
$this->dropTable('{{%document_template}}');
}
}