this error get:
queryexception in connection.php line 647: sqlstate[42s22]: column not found: 1054 unknown column 'nerd_level' in 'field list' (sql: insert users
(name
, email
, nerd_level
, updated_at
, created_at
) values (dasda, vincentnelissen@hotmail.nl, 1, 2017-04-05 19:16:42, 2017-04-05 19:16:42))
i've searched answer why happends , need migrate say. when try error:
[illuminate\database\queryexception]
sqlstate[42s01]: base table or view exists: 1050 table 'users' alre
ady exists (sql: create table users
(id
int unsigned not null auto_incr
ement primary key, name
varchar(255) not null, email
varchar(255) not n
ull, password
varchar(255) not null, remember_token
varchar(100) null,
created_at
timestamp null, updated_at
timestamp null, nerd_level
int
not null) default character set utf8mb4 collate utf8mb4_unicode_ci)
[pdoexception]
sqlstate[42s01]: base table or view exists: 1050 table 'users' alre
ady exists
could invest little time me please?
vincent
the users table exists migrations table doesn't have record of being migrated.
to solve issue:
export data
users
table want keep.comment out
up()
method in migration.run migration
php artisan migrate
. way migration recorded being completed. rollback migrationphp artisan migrate:rollback
. runsdown()
method, dropping users table.uncomment
up()
method.run migration again
php artisan migrate
.import
users
data step 1 if want.
Comments
Post a Comment