Flame
Flame

Reputation: 49

laravel migration showing old error after removing all migrations and DB?

I have configured Laravel database config file to use postgres DB. First of all when I tried to run migration, I got error like

[PDOException]

SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "sales_default_calculations" does not exist
LINE 1: select "id" from "sales_default_calculations" where "status"...

I moved all my migrations from database\migrations folder to database\migrations_bak and dropped the Database and created new one. I even created new Database with different name than before. However, I get same above error, when I run php artisan migrate. Even though migration files and DB is cleared it's showing same old error message. What may have caused this anomaly? Please someone help.

Upvotes: 2

Views: 1605

Answers (1)

lucasvscn
lucasvscn

Reputation: 1230

When you make manual changes to database/migrations folder, you have to run the command composer dump-autoload to make sure the classes are reloaded.

Upvotes: 2

Related Questions