m160411_211053_create_service.php 859 Bytes
<?php

use yii\db\Migration;

/**
 * Handles the creation for table `service`.
 */
class m160411_211053_create_service extends Migration
{
    /**
     * @inheritdoc
     */
    public function up()
    {
        $this->createTable('service', [
            'service_id' => $this->primaryKey(),
            'name'=> $this->string()->notNull(),
            'alias'=> $this->string(),
            'body'=> $this->text()->notNull(),
            'image' => $this->string(),
            'meta_title'=> $this->string(),
            'description' => $this->string(),
            'h1'=> $this->string(),
            'seo_text'=> $this->text(),
            'created_at' => $this->integer(),
            'updated_at' => $this->integer(),
        ]);
    }

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