m180830_105258_create_customer_table.php 1.09 KB
<?php

use yii\db\Migration;

/**
 * Handles the creation of table `customer`.
 */
class m180830_105258_create_customer_table extends Migration
{
    /**
     * {@inheritdoc}
     */
    public function safeUp()
    {
        $this->createTable('customer', [
            'id' => $this->primaryKey(),
            'name' => $this->string(),
            'secondname' => $this->string(),
            'dignity' => $this->string(),
            'gender'  => $this->smallInteger(1),
            'birth'  => $this->string(),
            'citizenship' => $this->string(),
            'passport'    => $this->string(),
            'email'       => $this->string(),
            'organization' => $this->text(),
            'status'       => $this->smallInteger(1),
            'language_id'  => $this->integer(),
            'image' => $this->string(),
            'conference' => $this->boolean(),
            'geee' => $this->boolean(),
            'gere' => $this->boolean()
            
        ]);
    }

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