Subject | How to downgrade as well as upgrade schema changes (a la Rails)? |
---|---|
Author | mlq97 |
Post date | 2008-10-08T15:38:12Z |
The classic way of changing schemas seems to be unidirectional and to
assume that all sequential upgrades will be stable and OK.
If they turn out not to be OK, the previous schema and data must be
restored from a backup, thus losing all data changes since the backup.
This seems very unsatisfactory because the schema error might not be
detected for some time and substantial data loss might result.
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.
1. Although this is also undesirable, is it not a better way of
handling this, as it potentially avoids losing the new data?
2. Does anyone do this with Firebird? If so, are there any tools to
help with this?
assume that all sequential upgrades will be stable and OK.
If they turn out not to be OK, the previous schema and data must be
restored from a backup, thus losing all data changes since the backup.
This seems very unsatisfactory because the schema error might not be
detected for some time and substantial data loss might result.
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.
1. Although this is also undesirable, is it not a better way of
handling this, as it potentially avoids losing the new data?
2. Does anyone do this with Firebird? If so, are there any tools to
help with this?