Hacker News new | ask | show | jobs
by hamandcheese 1316 days ago
I explicitly do not want to manage stored procedures in the same way as typical migrations - if I did, I would wind up with many, many versions of the procedure in my code base as it evolved over time. This would make grepping or locating the latest version pretty annoying.

Flyway (migration tool in Java) has a notion of “repeatable” migrations, though, which would do the trick.

1 comments

    This would make grepping or locating the latest version pretty annoying
Wouldn't this be an issue with any database object managed via migrations? Do any of them make this easy for any database object?

In ActiveRecord, you have your migrations folder(s) and then you have your `structure.sql` (essentially the raw output of mysqldump or pgdump) or the equivalent.

If I need to see the literal database definition of any database object I look it up in there. Not the slickest solution but works well enough - really just a few keystrokes in my editor.

I'd be curious how other migration tools handle (or fail to handle) this.

> Wouldn't this be an issue with any database object managed via migrations?

Like I mentioned, check out flyway repeatable migrations.