guild/console/migrations/m221017_112513_create_resume_template_table.php

33 lines
733 B
PHP
Raw Normal View History

2022-11-03 17:46:36 +03:00
<?php
use yii\db\Migration;
/**
* Handles the creation of table `{{%resume_template}}`.
*/
class m221017_112513_create_resume_template_table extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->createTable('{{%resume_template}}', [
'id' => $this->primaryKey(),
'title' => $this->string()->notNull(),
'created_at' => $this->dateTime(),
'updated_at' => $this->dateTime(),
'status' => $this->integer(2)->defaultValue(1),
'template_body' => $this->text(),
]);
}
/**
* {@inheritdoc}
*/
public function safeDown()
{
$this->dropTable('{{%resume_template}}');
}
}