You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have two connections having the same table names say:
connection: mysql has a table called products
connection: inventory has a table called products
when I generate migrations for both connections both of them lies on the same folder database/migrations with the same class name which causes this error:
Cannot declare class CreateProductsTable, because the name is already in use.
Kindly guide me a quick fix.
The text was updated successfully, but these errors were encountered:
Generate migrations for the second connection in a separate folder i.e php artisan migrate:generate --path=database/migrations/mysql. php artisan migrate:generate --path=database/migrations/inventory
Don't forget to create the mysql and inventory folders first before running the command.
You can then migrate with: php artisan migrate --path=database/migrations/mysql --connection=msql php artisan migrate --path=database/migrations/inventory --connection=inventory
I have two connections having the same table names say:
connection: mysql has a table called products
connection: inventory has a table called products
when I generate migrations for both connections both of them lies on the same folder database/migrations with the same class name which causes this error:
Cannot declare class CreateProductsTable, because the name is already in use.
Kindly guide me a quick fix.
The text was updated successfully, but these errors were encountered: