Why write a migration at all; do you have access directly to the database using either commandline or GUI clients?
Jan 9, 2020
3
Level 2
Query from Migration
I need to update the database inside my production environment. I want to expand a table to a many-to-many relationship. In order to do this I need to execute a query to copy rows from one table to another.
I don't want to dump the database from production to dev and execute the query's manually. I wonder if I am able to run the particular query from a migration, since it has to be run only once.
Please or to participate in this conversation.