Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
I've added seed data and operations in migration before. Are they that bad?
@alexbrooklyn From what I know and been told there not recommended as they can easily break.
I'm doing an upgrade to rails 6 and they all pretty much stopped working. So instead of working on the update, I've had to spend the past two days clearing out the data based migrations and move them all over to seeds.rb file. 847 migrations, almost done.
Yeah sure, fuck these seeders 🤦♂️/s
Crost41353yI don't think it's bad to seed in a migration. It has to be readable though. if I want to create a list of supported currencies why wouldn't I do it in a migration?
If it is a fixed insert... Okay....
But computing values and inserting....
Oh boy. You're standing in a pool of diarrhea.
From rounding errors (language defaults can change, settings too) to change of behavior to ....
Even if I tried to understand that merge fuckity above I don't think I'd be able to find all the subtle nuances where this can break in most spectacular ways.
amoux2743yWho the fuck does that. Omg