Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
AlmondSauce16395360dSo how else would you manage ensuring that your DB structure is in sync, exactly, across your environments? Do it manually? Just give your app blanket root permissions on the DB and get that to just create or delete what it needs? Neither of those sound like a great plan to me....
-
AlmondSauce16395360d@b2plane Because it can't sensibly provide a migration strategy from one version of the DB to another - you either drop everything and start again (obviously bad in prod) or you have to assume a version which is immensely fragile.
Plus, it means you have to give root DB permissions to your app which is a horrendous idea. -
myss4528360d@AlmondSauce might be missing something, but why exactly would you need a root permission to execute a db migration?
-
AlmondSauce16395360d@myss Well not necessarily root, but you'd need permissions to add, modify and drop tables, which is about as sweeping as you can get.
-
b2plane6395360d@AlmondSauce i cant boot up the backend if the flyway changes. Flyway is horrible for fast paced prototyping where i have frequent model changes needed for testing out the project. That means I'd need a whole ass new database version migration with new sql just so i can put a unique keyword for 1 row. Thats an overkill and a drag. And now imagine if i no longer need the unique for that field anymore. Now i have to create another migration version just to put the same sql code without the unique keyword
Also not to mention how i have to write raw sql even though all of it was written by an orm. The purpose of an orm is for me not to write custom SQL and then flyway comes where i have to write custom sql a side from orm -
AlmondSauce16395360d@b2plane How are you managing your backend? If you're using CI/CD then your backend should be migrated automatically when your Flyway script changes... it should be easy.
-
IntrusionCM14955359dAh yes.
Taking an iron cast pan to hammer a screw in the wall and complain about how the iron cast pan sucks cause its heavy, the wall damaged and the screw lost somewhere inside the wall....
You're mixing up entirely different concerns and workflows.
Prototyping can be manual, you just have to create a proper migration script at the end.
Flyway is bullshit. Genuinely who the FUCK finds this useful??? Why the Fuck do you want to have an ORM, next to a custom jdbc and to top it all off you also write custom sql queries in flyway just so you can prove your colleagues what db migrations happened WTF you can see that on git commits dumbass!!!! 3 different sql models that need to be the same but are written differently each. One through ORM, through code and through raw sql queries. Flyway just makes shit harder and having 1 change in model means i need to fuck myself with rewriting raw SQL queries in flyway WASTE OF TIME
rant