1

I try to create a table in MySQL but I get the following error:

SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'migrations' already exists (SQL: create table migrations (id int unsigned not null auto_increment primary key, migration varchar(255) not null, batch int not null) default character set utf8 collate utf8_unicode_ci)

How can I fix this?

waka
  • 3,362
  • 9
  • 35
  • 54
Hashan
  • 164
  • 8

2 Answers2

1

Try

php artisan migrate:fresh 

Or

Manually empty the database and including the migrations table and then try migrating again.

Sapnesh Naik
  • 11,011
  • 7
  • 63
  • 98
0

Try this

php artisan migrate:refresh

may i hope this work.

Niket Joshi
  • 739
  • 5
  • 23