4
b2plane
154d

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

Comments
  • 1
    So 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....
  • 0
    @AlmondSauce why cant jpa hibernate ORM do that?
  • 1
    @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.
  • 1
    @AlmondSauce might be missing something, but why exactly would you need a root permission to execute a db migration?
  • 1
    @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.
  • 0
    @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
  • 0
    @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.
  • 0
    Ah 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.
Add Comment