dimanche 8 novembre 2015

migrate update without rollback in laravel 5.1

I am beginner in laravel.
I use migrate for create table in database.
but i dont want to rollback my table when i use migrate update in laravel.
I want to apply changes in my old DB without loosing current data.

old migrate

       public function up()
{
    Schema::create('users', function (Blueprint $table) {
        $table->increments('id');
        $table->string('name');
        $table->string('email')->unique();
        $table->string('password', 60);
        $table->rememberToken();
        $table->timestamps();
    });
}

new migrate

   public function up()
{
    Schema::create('users', function (Blueprint $table) {
        $table->increments('id');
        $table->string('name');
        $table->string('family');
        $table->string('email')->unique();
        $table->string('password', 60);
        $table->rememberToken();
        $table->timestamps();
    });
}

mycomment :

php artisan migrate:refresh



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire