-
Notifications
You must be signed in to change notification settings - Fork 2
Migration
- In Access DB, prior to export, convert all date columns to date type, format
mm/dd/yyyy
. - If present, remove extraneous "ID" column, likely the initial column
- Best practice is to use LibreOffice and save csv format in utf8. Make sure to scrutinize delimiters and ensure semicolons are NOT used as delimiter.
- Change column header "Item Record ." to "Item Record #"
-
Staff Code
,Staff Code2
,StaffCode3
: Check for errant integers, check for lower-case alpha characters, replace with blank or upper-case. -
Type In-house Repair
,Type In-house Repair 2
,Type In-house Repair 3
: check for integers and replace with repair vocab strings. - Check
Department
to confirm presence of strings (not IDs) and no blanks - Normalize names in
Preformed In-house Repair ...
- Change column header "Item Record ." to "Item Record #"
- If present, remove extraneous "ID" column, likely the initial column
-
Run the migration to prepare the database.
rails db:migrate
-
Load users.
rails batch:load_users CSV_LOCATION=/tmp/current_users.csv
-
Load controlled vocabulary prior to other record types. All vocabularies are includes with the app in
/lib/assets/
.rails batch:department_controlled_vocabulary
rails batch:housing_controlled_vocabulary
rails batch:repair_type_controlled_vocabulary
rails batch:contract_conservators_controlled_vocabulary
rails batch:staff_code_controlled_vocabulary
-
Deactivate/comment-out model validations for In-house and External repairs.
-
You must supply a csv in utf8 format with records, exported from the legacy access db. Conservation records have a one to one/many relationship with the other records, they anchor all other records types aside from controlled vocabulary.
rails batch:conservation_records CSV_LOCATION=/tmp/Conservation-Data-with-headers.csv
-
You must supply a csv in utf8 format with records, exported from the legacy access db. Treatment reports have a one-to-one relationship with conservation records.
rails batch:treatment_reports CSV_LOCATION=/tmp/Treatment-Record.csv