Oh, I've just created new topic about converting of existing data. How is it possible to use DB in migrations?
As for your question I believe that using low-level SQL queries is appropriate action. I fully agree with you that migration should not rely on code's current version. migrate::refresh and migrate::rollback both run old migrations that have been written some time ago so can rely on another model's code version. Results are unpredictable.
On the other side low-level SQL queries rely on database structure only.
PS But I am still searching how low-level queries could be executed
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community