This site uses cookies to deliver our services and to show you relevant ads and job listings.
By using our site, you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our Terms of Service.
Your use of Stack Overflow’s Products and Services, including the Stack Overflow Network, is subject to these policies and terms.

Join us in building a kind, collaborative learning community via our updated
Code of Conduct.

In rails you can setup a rails app, assign the right db driver (I need firebird/fb) and then do a rake db:schema:dump pretty much out of the box.

I'm trying to do a version control for my database schema. How can I just make a ruby script that requires activerecord and fb libraries and achieve the same thing. I dont' need an entire rails app. All I want is a consistent script to extract the schema.

Of course my adapter is different but it could be modified and it's versatile with a Rails app so you could drop the code part into the root directory. But of course you can rake for that but this just shows that it works. Tou might nave problems with the migration version though. I haven't thoroughly tested it.