1
0
Fork 0
mirror of https://github.com/janickiy/yii2-nomer synced 2025-03-09 15:39:59 +00:00
yii2-nomer/migrations/m170822_144025_create_tickets_table.php
2020-02-05 06:34:26 +03:00

37 lines
943 B
PHP

<?php
use yii\db\Migration;
/**
* Handles the creation of table `tickets`.
*/
class m170822_144025_create_tickets_table extends Migration
{
/**
* @inheritdoc
*/
public function up()
{
$this->createTable('tickets', [
'id' => $this->primaryKey(),
'user_id' => $this->integer(),
'site_id' => $this->smallInteger(),
'ip' => $this->string(15),
'subject_id' => $this->smallInteger(2),
'text' => $this->text(),
'status' => $this->smallInteger(1),
'tm_create' => $this->dateTime(),
'tm_read' => $this->dateTime(),
'tm_close' => $this->dateTime(),
'tm_reopen' => $this->dateTime(),
]);
}
/**
* @inheritdoc
*/
public function down()
{
$this->dropTable('tickets');
}
}