<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        // TODO: Change this to Schema syntax when upgraded to new version of laravel. Couldn't make doctrine/dbal to work.
        DB::statement('ALTER TABLE `dos_client_addresses` MODIFY floor varchar(255) NULL');
        DB::statement('ALTER TABLE `dos_client_addresses` MODIFY apartment varchar(255) NULL');
        DB::statement('ALTER TABLE `dos_client_addresses` MODIFY comment varchar(255) NULL');
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        // TODO: Change this to Schema syntax when upgraded to new version of laravel. Couldn't make doctrine/dbal to work.
        DB::statement('ALTER TABLE `dos_client_addresses` MODIFY floor varchar(255) NOT NULL');
        DB::statement('ALTER TABLE `dos_client_addresses` MODIFY apartment varchar(255) NOT NULL');
        DB::statement('ALTER TABLE `dos_client_addresses` MODIFY comment varchar(255) NOT NULL');
    }
};
