<?php

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

class m230905_095842_photo_filter extends Migration
{

    public function init()
    {
        $this->db = 'db';
        parent::init();
    }

    public function safeUp()
    {
        $tableOptions = 'ENGINE=InnoDB';

        $this->createTable(
            '{{%photo_filter}}',
            [
                'id'=> $this->primaryKey()->unsigned(),
                'brightness'=> $this->integer()->unsigned()->notNull(),
                'saturate'=> $this->integer()->unsigned()->notNull(),
                'contrast'=> $this->integer()->unsigned()->notNull(),
                'opacity'=> $this->float()->unsigned()->notNull(),
            ],$tableOptions
        );

    }

    public function safeDown()
    {
        $this->dropTable('{{%photo_filter}}');
    }
}
