Tell me more ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

2 DBs having schemas that represent the same semantic objects. The first one is production DB (Non-RDBMS, in-house implemented in-memory DB with shitload of RAM). Other is Postgres.

Once in a while the production DB is changed (schema upgrade).

Question: what is the best practice to keep DBs of different types aligned semantically?

share|improve this question
Possible duplicate from SO: stackoverflow.com/questions/175451/… – Bacon Bits Feb 21 at 19:45
2  
Keep in mind that your options are going to be severely limited if you're using a custom, in-house database. Additionally, it's generally considered best practice for dev and prod to at least use the same systems. Having dev be Postgres but prod be custom-memory.db is a little awkward. – Bacon Bits Feb 21 at 19:47

1 Answer

keep all SQL DDL in "patch" files in source control.

add a "schema_version" table to your database and track the latest patch file you are on.

write a script that runs new patches against your dbs.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.