views:

32

answers:

1

We use NHibernate generated schema to run unit tests against a database (integration tests I guess they are). I wondered if it was feasible to compare the generated schema against our development database. This would tell us when we had misspelt column names in our mappings or other issues like that. It would also go a long way toward keeping keys and the like consistent across the two.

Is this kind of automated compare feasible? How is the best way to go about doing it?

+1  A: 

If you are unable to find a solution using nhibernate, you could look into something like RedGate's SQL Compare tool. This tool makes it incredibly easy to perform comparisons on different databases and see the schema differences. They also have a software development kit that allows you to leverage the power of SQL Compare in your own applications (something I have not yet gotten into, but would love to if the need ever arose).

TheTXI
We do have a license for SQL compare so this may be possible. Ideally i would want something that is already implemented though.
Jack Ryan
JayArr: I know where you are coming from, I was just putting this out there as an alternate route in case things don't work out right.
TheTXI