开发者

Techniques to keep database schema up to date

I know two techniques to keep database schema up to date for all developers.

One is rails migrations. And the other is Hibernate's SchemaUpdate.

Can you review more techni开发者_如何学JAVAques to keep the DB schema up to date?


I think its very hard to find a ready made, magical tool that maintain your schema changes, i think its not hard to implement your custom tool and design the updates incrementally and make your own versioning system of the database.

My suggestion (and i do that) is to make a small updater tool that take the update scripts from the new version of the application and apply the required updates depending on the previous DB version that is saved somewhere, the update scripts should be robust and well-written and don't make a damage for the old data. Because DDL changes are not inversable (You can't use transactions) i suggest to take a backup for the database before the update process and restore it if the update failed or delete it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜