sqlite - Conflicting table names with laravel -


i trying set tables , wasn't getting data table , tried doing db:table('tablename')->insert($variable);

i had migration tablename , thought inserting data migration, in fact seems have created different table same name.

so when try run php artisan migrate errors. i've looked sqlite database , don't see duplicate table.

i can't find how fix error. i've run every migrate command try , go nothing works.

errors: [illuminate\database\queryexception] sqlstate[hy000]: general error: 1 table "regions" exists (sql: create table "regions" ("id" integer not null primary key autoincrement, "user_id" integer not null, "start" float not null, "end" float not null, "data" text not null, "created_at" datetime null, "updated_at" datetime null, "remember_token" varchar null, foreign key("user_id") references "users"("id") on delete cascade)) [pdoexception] sqlstate[hy000]: general error: 1 table "regions" exists

you need go in , manually delete table (and/or 'other' table same name.

then re-run migration , populate accordingly. after should able run following 'update' tables change through migration files:

php artisan migrate:refresh 

to add things table manually after have tables setup - try using seeds:

php artisan db:seed 

Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -