hasTable('setting'); if (!$exists) { $table = $this->table('setting'); $table->addColumn('key','string',["limit" => 50]) ->addColumn('type','integer') ->addColumn('value','text') ->addColumn('created_at','date') ->addColumn('updated_at','datetime') ->addIndex(["key"], ['unique' => true]) ->create(); } } public function down() { $this->table('setting')->drop()->save(); } }