I have several migrations I am running in Laravel 4. I use the php artisan migrate:rollback
and php artisan migrate
commands to populate the tables. Interestingly enough, one of my migrations has stopped working (cannot roll back). All of the others are working fine. I haven't changed anything to my knowledge.
The migration in question is named: 2013_06_19_050252_create_artists_table.php
And it looks like so:
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateArtistsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('artists', function(Blueprint $table) {
$table->increments('id');
$table->string('url_tag')->unique();
$table->string('username');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('artists');
}
}
I have no idea why this isn't working. Any ideas what could be going on?
I had the same problem and did something similar to this to fix it. This is what worked for me.
composer dump-autoload
- this gets the old migration out of the system's memoryphp artisan migrate
in the command lineThe file system basically thinks this is a new migration, so it gives it a "fresh start".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With