Hello can you help me with the following question I did:
I try to run migrations for a pre-existing schema on laravel 5.7 application. But as the question says the migrations fail.
Hello can you help me with the following question I did:
I try to run migrations for a pre-existing schema on laravel 5.7 application. But as the question says the migrations fail.
For further actions, you may consider blocking this person and/or reporting abuse
ivan.gavlik -
Abhay Chaturvedi -
Honeybadger Staff -
Honeybadger Staff -
Top comments (4)
Try to specify your pre-existing schema in the phpunit.xml config file.
Make sure you have backup of that db before running the test. Laravel's
DatabaseMigrations
trait will drop everything and re-migrate.I have tried that and I still get the error.
Are you able to run that migration outside of the test?
By setting the test database, nope I am unable to run the migrations.
The cause is that the postgresql database I am using actually keeps the columns into the table even if I delete it from the table and just hides it from the user.
The solution is to reconstruct the test database. So how I can prepend my existing migrations with one that generates the database?