[OPEN-ILS-GENERAL] Data migration – Best practices

Jason Etheridge jason at esilibrary.com
Fri Mar 8 14:24:47 EST 2013


> 2. Use staging tables.

I'll second this.  The documentation
(http://docs.evergreen-ils.org/2.1/html/migrating_records_using_migration_tools.html)
doesn't reflect this, but those migration tools can help you create
staging tables.

Let's say you have a migration schema foo.  Then you can create a
foo.asset_copy table that is shaped exactly likely the real asset.copy
table, complete with the same sequences.  Then you can create a
foo.asset_copy_legacy child table that inherits from foo.asset_copy,
but includes legacy fields for the incoming data, so the resulting
table may have, for example, a barcode column, and a l_barcode column.
 Then you just map from the l_ fields to the real fields in
foo.asset_copy_legacy, and when you're ready to load things into
production, you can just insert from foo.asset_copy into asset.copy.

-- 
Jason Etheridge
| Support Manager
| Equinox Software, Inc. / The Open Source Experts
| phone: 1-877-OPEN-ILS (673-6457)
| email: jason at esilibrary.com
| web: http://www.esilibrary.com


More information about the Open-ils-general mailing list