From: brabuhr@... Date: 2010-07-29T12:37:46+09:00 Subject: Re: tool to compare DB schema against DDL file On Wed, Jul 28, 2010 at 9:48 PM, Fabian Marin wrote: > Well I'll grant you one thing, it sure ain't pretty but it gets the job > done, at least with simple requirements.  It even seems surprising that > it is fairly short.  Then again, have you ever tried parsing DDL files > to generate a similar diff?  I would think even mixing (a ruby schema > against a DDL file) would be possible. I've not tried it; it should work, but I'm more comfortable reading Ruby than SQL :-) > Did you code this for fun or did your job demand it? Mostly fun :) one recent case where it's handy is with an internal Rails app I have that hits an Oracle database for an external PHP app; for development, I originally did a schema:dump from Oracle and a schema:load into H2. The script provides a quick way to get an idea of what they've changed in the database. At present, I'm just reading the existing data, so losing database-side integrity in the rails schema.rb doesn't cause much trouble.