Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

One nice thing about migrations describing your schema is that they can be used to migrate databases from different vendors. But if you rely upon scripts to create and migrate databases, you need to write a script for each one.

And there is no partial rollback. You get to write another script for that or do it manually.

In olden times, I used to have to write these for Oracle and SQL Server, and just keeping them in sync was a challenge. And you had to write a specific script or execute multiple smaller scripts to move from version 1.3 of the schema to version 3.9. The incremental, db agnostic, reversible approach is much better.

But you really need to make sure the end result is exactly what you expect before executing on production (and back it up first of course). The db-specific script seems much easier to trust, with no magic happening, especially when its atomic.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: