One of my migrations is not running with the php artisan command in Laravel 4 -


i have several migrations running in laravel 4. use php artisan migrate:rollback , php artisan migrate commands populate tables. interestingly enough, 1 of migrations has stopped working (cannot roll back). of others working fine. haven't changed knowledge.

the migration in question named: 2013_06_19_050252_create_artists_table.php

and looks so:

    <?php  use illuminate\database\migrations\migration; use illuminate\database\schema\blueprint;  class createartiststable extends migration {      /**      * run 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 migrations.      *      * @return void      */     public function down()     {         schema::drop('artists');     }  } 

i have no idea why isn't working. ideas going on?

i had same problem , did similar fix it. worked me.

  1. delete tables , columns migration supposed create if still there.
  2. rename migration in app/database/migrations file incrementing last number in migration file's name one. example: rename "2014_06_01_190448_create_users.php" "2014_06_01_190449_create_users.php"
  3. run composer dump-autoload - gets old migration out of system's memory
  4. rerun php artisan migrate in command line

the file system thinks new migration, gives "fresh start".


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -