I need to drop the column UserDomainName from my database table clients.
At first I installed doctrine/dbal by executing composer require doctrine/dbal followed by composer update, like described in the documentation.
Then I created the migration which I want to use to drop the column:
php artisan make:migration remove_user_domain_name_from_clients --table=clients
I added Schema::dropColumn('UserDomainName'); to the down() method:
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class RemoveDomainName extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('clients', function (Blueprint $table) {
//
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('clients', function (Blueprint $table) {
Schema::dropColumn('UserDomainName');
});
}
}
However, I get
Migrating: 2017_08_22_135145_remove_user_domain_name_from_clients
Migrated: 2017_08_22_135145_remove_user_domain_name_from_clients
after executing php artisan migrate but no Column is dropped.
If I execute it again I get Nothing to migrate.