Subject Re: [firebird-support] How to downgrade as well as upgrade schema changes (a la Rails)?
Author Fidel Viegas
On Wed, Oct 8, 2008 at 4:38 PM, mlq97 <mlq@...> wrote:

> In Rails there is a standard methodology for downgrading schemas as
> well as upgrading. It applies a "reverse upgrade" to an existing live
> database by reversing the schema changes applied in the last upgrade.

Hi mlq,

You can't really compare a framework with an RDBMS. Rails is a
framework for the Ruby language, and Firebird is an RDBMS. The process
you are referring to is called ActiveRecord Migrations, and that is
database independent. The Rails framework supports pretty much any
RDBMS you can think of. And yes, that includes Firebird as well.


> 2. Does anyone do this with Firebird? If so, are there any tools to
> help with this?

You can use the Rails framework to do this. All you need is the
ActiveRecord Adapter for the Firebird RDBMS, the FireRuby driver if
you are using Ruby or the JayBird driver and ActiveRecord-jdbc-adapter
for Firebird if you are using JRuby. Since I work a lot with Java, I
use the JRuby version, and therefore the JayBird driver.

Firebird is pretty well supported, but there are some things you
should be aware of, which are described in
http://docs.huihoo.com/api/ruby-on-rails/classes/ActiveRecord/ConnectionAdapters/FirebirdAdapter.html

If you have used the Rails framework with any other RDBMS, then it
shouldn't be a problem to use it with Firebird. Just change your
Adapter.

I hope this answers your questions, and if you do have more questions
then you should ask them in a rails forum in case your questions are
related to Rails in general, or if your problem is related to
FireRuby, then you should send your questions to the appropriate
firebird mailing list, which I hope someone will answer for me.

Good luck!

Fidel.