m180507_122728_create_event_table.php 749 Bytes
<?php

use yii\db\Migration;

/**
 * Handles the creation of table `event`.
 */
class m180507_122728_create_event_table extends Migration
{
    /**
     * {@inheritdoc}
     */
    public function safeUp()
    {
        $this->createTable('event', [
            'id' => $this->primaryKey(),
            'image_id'   => $this->integer(),
            'created_at' => $this->integer(),
            'updated_at' => $this->integer(),
            'deleted_at' => $this->integer(),
            'sort'       => $this->integer(),
            'status'     => $this->boolean(),
            'author_id'  => $this->integer(),
        ]);
    }

    /**
     * {@inheritdoc}
     */
    public function safeDown()
    {
        $this->dropTable('event');
    }
}