<?php

use yii\db\Migration;
use yii\db\Schema;

/**
 * Class m231114_085352_create_table_setting
 */
class m231114_085352_create_table_setting extends Migration
{
    /**
     * {@inheritdoc}
     */
    public function safeUp()
    {
        $this->createTable('setting', [
            'id' => 'pk',
            'name' => Schema::TYPE_STRING.' NOT NULL',
            'id_producer' => Schema::TYPE_INTEGER,
            'string' => Schema::TYPE_STRING,
            'text' => Schema::TYPE_TEXT,
            'date' => Schema::TYPE_DATE,
            'integer' => Schema::TYPE_INTEGER,
            'float' => Schema::TYPE_FLOAT,
            'double' => Schema::TYPE_DOUBLE,
            'boolean' => Schema::TYPE_BOOLEAN,
        ]);
    }

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