i just have created a new migration file, to insert a new column to existing table.
the file code is:
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddStatusToPhoto extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('photos', function(Blueprint $table)
{
$table->integer('status');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}
but when i run php artisan migrate, there is an error message:
[Illuminate\Database\QueryException]
SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'permission_
role' already exists (SQL: create table `permission_role` (`id` int unsigne
d not null auto_increment primary key, `permission_id` int unsigned not nul
l, `role_id` int unsigned not null, `created_at` timestamp default 0 not nu
ll, `updated_at` timestamp default 0 not null) default character set utf8 c
ollate utf8_unicode_ci)
anyone know what is the problem?
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1X7La8J
via IFTTT
Aucun commentaire:
Enregistrer un commentaire