Skip to content
Advertisement

SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘payments’ already exists (SQL: create table `payments`

When I migrate a table I see this error,

SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘payments’ already exists (SQL: create table payments

JavaScript

Error

Advertisement

Answer

If you want to recreate the table, run php migrate:rollback first to delete the existing one. This command will run the down() method in the migration.

Then run php migrate to create the table again.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement