Skip to content

Migration

Sean Crowe edited this page Mar 22, 2022 · 12 revisions

Starting with a clean database:

  1. Run the migration to prepare the database.

    rails db:migrate

  2. Load users.

    rails batch:load_users

  3. 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

  4. 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

  5. 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

Clone this wiki locally