1

hope this is not a duplicate question but couldn't find the solution, even though I ran into this issue more than once now so decided to throw it out here.

There's a couple of issues I sometimes run in to when it comes to Laravel's DB migrations and SQLite (the driver I have configured for testing). In this case it's mostly the dropForeign issue which is not supported by SQLite (yes there are workarounds for that but I never got it to work properly and prefer not to open that discussion here)

There's also some migrations with raw "ALTER TABLE CHANGE 'from' 'to'" statements in there which didn't work in my tests, since it changed both the column name and type. It worked once I changed it by first changing the type, and then renaming.

Problem is that this is an existing project and the platform is already quite big. Editing existing migrations is something I should avoid I guess?

I like to write my code in tests, even though this project is not test driven developed, I'm hoping to still wrap the features I will write in tests.

Thanks!

Edit: Laravel version is 5.8

Timm49
  • 31
  • 2
  • We used this package: https://github.com/oscarafdev/migrations-generator to clean up / reset a horrible migration history. Then we could use sqlite for our tests. Took some time but man did that feel good. – ajthinking Aug 11 '20 at 14:20
  • Nice, thanks man. I was already trying out this one, seems slightly similar at first glance but your link seems more updated recently. https://github.com/Xethron/migrations-generator – Timm49 Aug 11 '20 at 14:37

0 Answers0