npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

kjahan-apricot-migrations

v1.0.30

Published

Update Apricot

Downloads

39

Readme

Apricot Migrations

update apricot

Setup Dev:

  • Copy dev.env to .env for config
  • Make sure you are using node@10
  • If running from the cloned repo, run the following commands:
    • npm install
    • npm run build
    • sudo npm link
      • If running windows you will need to run npm link from an admin terminal

Deploy to docker migration package (Run without cloning this repository)

  • After changes are merged into master, this pipeline automatically publishes to NPM.
  • To update the migrations package with the latest for updating apricot locally
    1. Go to apricot-docker repo
    2. on the master branch, click
      1. ...
      2. Run pipeline for a branch
    3. You should see a window titled Run pipeline for master
    4. On the dropdown select custom: Node
    5. Click Run
    6. After the pipeline finishes you should be able to pull the migrations container and run the upgrade script

Update dev database

  • If you have access to connect to the Apricot Dev container and want to upgrade migrations.
    1. Verify that your version has been merged with master so it will automatically publish to npm.
    2. npm i @social-solutions/apricot-migrations -g to upgrade the package on dev.
    3. Navigate into the migrations folder and run apricot-migrations your-migration

Setup Cli:

  • Run apricot-migrations -h to see help

env_file:

Used to set passwords and hostnames when running migration tool

  • Contents
    • Required:
      • MYSQL_WRITE_PASSWORD=
      • MYSQL_GLOBAL_PASSWORD=
      • MYSQL_SESSIONS_PASSWORD=
    • Optional:
      • QUEUE_NAME=upgrade
      • QUEUE_CONCURRENT_JOBS=5
      • MYSQL_WRITE_USERNAME=apricot
      • MYSQL_WRITE_HOSTNAME=null
      • MYSQL_GLOBAL_USERNAME=global
      • MYSQL_GLOBAL_DB_NAME=magician
      • MYSQL_GLOBAL_HOSTNAME=apridbglobal
      • MYSQL_SESSION_DB_NAME=session
      • MYSQL_SESSION_HOSTNAME=apridbglobal
      • REDIS_HOST=localhost
      • REDIS_PORT=6379
      • REDIS_DB=0
      • REDIS_PASSWORD=null

REDIS_HOST defaults to localhost if not provided

hosts_file:

Used to map hostnames to ip addresses or other hostnames

important versions and how to run them:

Note: substitue apricot-migrations with docker-compose -f docker-compose.packages.yml run migrations if running from the Apricot containers

Org Options

|Name|Option|Value|Example| |----|------|-----|-------| |Single Org|-o|org_number|123456| |*Org File|-of|relative file path|./folder/myFile.txt| |Org Type|-ot|360, essentials, core| N/A | |All Orgs|-a| N/A | N/A | *The contents of the org file should be a comma separated list of org_ids

Reverting Migrations

Each new migration should have a revert action accompanying them. Please see some of the most recent versions created for examples some of the older ones predate the addition of the revert functionality.

|Name|Option|Value|Example| |----|------|-----|-------| |Revert Single Org|-ro|org_number|123456| |*Revert Org File|-rof|relative file path|./folder/myFile.txt| |Revert All Orgs|-ra| N/A | N/A | |Revert Global Action|-rg| N/A | N/A | |Revert Session Action|-rs| N/A | N/A | *The contents of the org file should be a comma separated list of org_ids

Preferences

Preferences should not be updated via a version. Instead, you should use the preference tool outlined below.

To update the preferences of an org or multiple orgs use the following examples as a template to update them. This script accesses the preferences table in a respective org. You can add a preference to many orgs using the organization file flag or the organization type flag.

apricot-migrations -p preference_name -pv preference_value -o 123456

To delete the preferences

apricot-migrations -pd preference_name -o 123456

*See org options above for ways to run preferences for multiple orgs

Versions

Version 7.0

  • apricot-migrations -v 7.0 -a or apricot-migrations -v 7.0 -o {org_number}
    • Adds metadata to xml_bulletin_states table
    • Adds site_insights_enabled preference
    • Creates sites table
    • Adds generated_form_id to report_columns and report_forms table
    • Updates Program Reference tags
    • Update Program_view to include site_id
    • Adds all programs to default site
    • Add Apricot Instance preference
    • Set site_myapricot_color_scheme from orange to green

Version 7.1

  • apricot-migrations -v 7.1 -a or apricot-migrations -v 7.1 -o {org_number}
    • Creating user_mfa table

Version 7.6

  • apricot-migrations -v 7.6 -a or apricot-migrations -v 7.6 -o {org_number}
    • Adding record_name_field_guid column to forms table

Version 7.7

  • apricot-migrations -v 7.7 -s
    • Adding permissions, user_id and original_user_id columns to the sessions table

Version 7.11

  • apricot-migrations -v 7.11 -g
    • Adding invited column to magician.global_users table

Version 7.26

  • apricot-migrations -v 7.26 -a or apricot-migrations -v 7.26 -o {org_number}
    • Adding is_reporting_data_source column to forms table

Version roles

  • apricot-migrations -v roles -a or apricot-migrations -v roles -o {org_number}
    • Creates roles table
    • Seeds the roles table with roles based on existing permissions
    • Adds role_id column to the permissions table and sets it

Version roles-add-connect-role

  • apricot-migrations -v roles-add-connect-role -a or apricot-migrations -v roles-add-connect-role -o {org_number}
    • Creates product area 'External Access' if it does not exist
    • Creates role 'Manage Connect' under 'External Access' if it does not exist

Version caseloads

  • apricot-migrations -v caseloads -a or apricot-migrations -v caseloads -o {org_number}
    • Creates document user access table if it does not exist
    • Creates document user category links table if it does not exist
    • Creates document user category table if it does not exist
    • Alters document user access with delete cascade constraint on document_id

Version site-cleanup

  • apricot-migrations -v site-cleanup -g
    • Adding owner, parent_instance, org_type, sfdc_id, decomm_date, org_category, org_preferences to the organizations table

Version automated-imports

  • apricot-migrations -v automated-imports -a or apricot-migrations -v automated-imports -o {org_number}
    • Adding is_automated to the import_states table if it does not exist

Version blueprint-references

  • apricot-migrations -v blueprint-references -a - Creating blueprint_references table

Version secure-super-user

  • apricot-migrations -v secure-super-user -g
    • Adding password_mod_time to the global super_users table if it does not exist
    • Adding the super_user_password_history table if it does not exist

Version rules-alerts

  • apricot-migrations -v rules-alerts -g
    • Create the rules_queue table.
  • apricot-migrations -v rules-alerts -a or apricot-migrations -v rules-alerts -o {org_number}
    • Creates rules_category, rule, rule_category_links, condition, action, and action_scope tables.

Version calenders

  • apricot-migrations -v calendars -a or apricot-migrations -v calendars -o {org_number}
    • Creates appointments tables.

Version enhanced-designer-restrictions

  • apricot-migrations -v enhanced-designer-restrictions -a or apricot-migrations -v enhanced-designer-restrictions -o {org_number}
    • Adding designer-restrictions to the forms table if it does not exist

Version site-admins

  • apricot-migrations -v site-admins -a or apricot-migrations -v site-admins -o {org_number}
    • Create sites_users table for site admin linking
    • seeds sites_users table with data

Version blueprints-externalIds

  • apricot-migrations -v blueprints-externalIds -a
    • Adding external_id column to the forms, sections, fields, and field_options tables

Version blueprints-manually-mapped

  • apricot-migrations -v blueprints-manually-mapped -a
    • Adding manually_mapped column to the forms table

Version blueprints-participant-backfill

  • apricot-migrations -v blueprints-participant-backfill -a
    • Backfills profile form as manually mapped participant form

Version blueprints-participant-backfill-fix

  • apricot-migrations -v blueprints-participant-backfill-fix -a
    • Fixes parent_id backfills profile form as manually mapped participant form

Version blueprints-participant-backfill-batch2

  • apricot-migrations -v blueprints-participant-backfill-batch2 -a
    • Backfills profile form as manually mapped participant form, 2nd batch.

Version blueprints-participant-backfill-batch3

  • apricot-migrations -v blueprints-participant-backfill-batch3 -a
    • Backfills profile form as manually mapped participant form, 3rd batch.
    Version blueprints-designer-restrictions
  • apricot-migrations -v blueprints-designer-restrictions -a
    • Adding designer_restriction column to the sections table

Version active-roles

  • apricot-migrations -v active-roles -a
    • Adds active column to roles table

Version add-dynamic-attendance-notes

  • apricot-migrations -v add-dynamic-attendance-notes -a
    • Adding dynamic notes to student attendance and display options

Version fix-swf-query

  • apricot-migrations -v fix-swf-query -a or apricot-migrations -v fix-swf-query -o {org_number}
    • Updating the query_id field property value for APRICOT_SECURE_WEB_FORM_FORM_SELECT_PROGRAMS field with the id of the Programs query or Inserting the query_id property if it doesn't exist

Version enable-migration-tool

  • apricot-migrations -v enable-migration-tool -a or apricot-migrations -v enable-migration-tool -o {org_number}
    • Creates and/or updates role_merge_tool_enabled value to 1 if AFF is not enabled

Version refresh-RA-rules-phase-1

  • apricot-migrations -v refresh-RA-rules-phase-1 -a or apricot-migrations -v refresh-RA-rules-phase-1 -o {org_number}

    • Queries the db for rules, conditions, actions, and action_scopes for the selected org(s) and inserts them into the Redis cluster

    Version add-virtual-table-columns

  • apricot-migrations -v add-virtual-table-columns -a or apricot-migrations -v add-virtual-table-columns -o {org_number}

    • Add the columns programs_viewable and sites_viewable to the report_forms table

Version permission-set-id-index

  • apricot-migrations -v permission-set-id-index -a or apricot-migrations -v permission-set-id-index -o {org_number}
    • Add an index permission_set_id_idx on the permisisons table for the id column
    • Will also remove IDX_ID and IDX_ACCESS indexes, as these are duplicates

Version permission-table-indexes

  • apricot-migrations -v permission-table-indexes -a or apricot-migrations -v permission-table-indexes -o {org_number}
    • Add an index grantedid_granted_view_idx on the permisisons table for the granted_id, granted, and view columns
    • This will speed up doc folder record counts for orgs that have many rows in the permissions table

Version secure-field-access

  • apricot-migrations -v secure-field-access -a or apricot-migrations -v secure-field-access -o {org_number}
    • Adds secure fields audit secure_field_audits table and secure_field column to permissions table

Version sites-add-location-column

  • apricot-migrations -v sites-add-location-column -a or apricot-migrations -v sites-add-location-column -o {org_number}
    • Adds new JSON column location to the sites table for storing location data

Version calendars-alter-appointments-location

  • apricot-migrations -v calendars-alter-appointments-location -a or apricot-migrations -v calendars-alter-appointments-location -o {org_number}
    • Update column location type to VARCHAR(255) in appointments table

Version attendance-dynamic-options-fixes

  • apricot-migrations -v attendance-dynamic-options-fixes -a or apricot-migrations -v attendance-dynamic-options-fixes -o {org_number}

Version program-override-roles

  • apricot-migrations -v program-override-roles -a or apricot-migrations -v program-override-roles -o {org_number}

Version data-table-add-document-active-index

  • apricot-migrations -v data-table-add-document-active-index -a or apricot-migrations -v data-table-add-document-active-index -o {org_number}
    • This will add an index (document_id, active) to every data table

Version add-user-list-field

  • apricot-migrations -v add-user-list-field -g
    • This will add a field type and field category data for the userlist field

Version add-address-lookup-components-field

  • apricot-migrations -v add-address-lookup-components-field -g
    • This will add a field type and field category data for the new universal address lookup field

Version documents-table-add-create-import-id-column

  • apricot-migrations -v documents-table-add-create-import-id-column -a or apricot-migrations -v documents-table-add-create-import-id-column -o {org_number}
    • This will add a new columns create_import_id, and create_import_row_id to the documents table

Version enrollments

  • apricot-migrations -v enrollments -a or apricot-migrations -v enrollments -o {org_number}
    • This will add document_enrollment_links and enrollment_assigned_user tables to the apricot db

Version sites-programs-indexes

  • apricot-migrations -v sites-programs-indexes -a or apricot-migrations -v sites-programs-indexes -o {org_number}
    • This will add new indexes idx_siteid and idx_programid to the sites_programs table

Version enrollment-saves

  • apricot-migrations -v enrollment-saves -a or apricot-migrations -v sites-programs-indexes -o {org_number}
    • This will create a new document_enrollment_saves table for tracking when programs are enrolled
    • This will add a new foreign key column (save_id) to the documents_enrollment_link table

Version roles-add-intake-manager

  • apricot-migrations -v roles-add-intake-manager -a or apricot-migrations -v roles-add-intake-manager -o {org_number}
    • Creates role 'Intake Manager' under 'External Access' if it does not exist

Version update-bulletin-table-columns

  • apricot-migrations -v update-bulletin-table-columns -a or apricot-migrations -v update-bulletin-table-columns -o {org_number}
    • This will add new columns start_time and end_time to the xml_bulletin_states table

Version enrollments-audit

  • apricot-migrations -v enrollments-audit -a or apricot-migrations -v enrollments-audit -o {org_number}
    • Creates the document_enrollment_links_audits table

Version form-field-limit

  • apricot-migrations -v form-field-limit -a or apricot-migrations -v form-field-limit -o {org_number}
    • Creates the max_fields column in the forms table

Version enrollments-create-reporting-form

  • apricot-migrations -v enrollments-create-reporting-form -a or apricot-migrations -v enrollments-create-reporting-form -o {org_number}
    • Creates a restricted form and form state with system fields. This is needed so that enrollments can be reported on in zf1 reporting

Version enrollments-delete

  • run apricot-migrations -v enrollments-delete -a or apricot-migrations -v enrollments-delete -o {org_number}
    • Adds the 'Deleted' option to the action enum in the document_enrollment_links_audits table
    • Removes the foreign key from document_enrollment_link_audits table
  • revert apricot-migrations -v enrollments-delete -ra or apricot-migrations -v enrollments-delete -ro {org_number}

Version enrollments-tier2

  • apricot-migrations -v enrollments-tier2 -a or apricot-migrations -v enrollments-tier2 -o {org_number}
    • This will add document_enrollment_links_tier2 table to the apricot db
    • Table is used to tie tier 2 records to enrollments for reporting

Version form-guid

  • apricot-migrations -v form-guid -a or apricot-migrations -v form-guid -o {org_number}
    • Creates the guid and parent_guid columns in the forms table

Version remove-unused-permission-sets

  • apricot-migrations -v remove-unused-permission-sets -a or apricot-migrations -v remove-unused-permission-sets -o {org_number}
    • takes all assigned permission sets from users_metadata_view and compares them against the permissions table. Any that are not currently in use by a user are deleted. Affected tables are:
      • documents
      • document_program_links
      • data_{permission_set_form_id}
      • record_actions
      • links
      • permissions

Version consolidate-permissions

  • apricot-migrations -v consolidate-permissions -a or apricot-migrations -v consolidate-permissions -o {org_number}
  • RBP ORGS ONLY! Resolves an issue where multiple permission sets are created for a single program/role combo. Theoretically, there should only be one. Brings back all permissions, searches for extras made, and reassignes any users that are using the extra permission sets to all use that same, single permission set. The remove-unused-permission-sets script can be ran after this one to clean up the extras, as they will become unused by any user.

Version remove-duplicate-document-program-links

  • apricot-migrations -v remove-duplicate-document-program-links -a or apricot-migrations -v remove-duplicate-document-program-links -o {org_number}
  • Removes duplicate entries on the document_program_links table, there should only ever be one document_id and program_id pair.
  • Gathers a list of program_ids, iterates through each searching for duplicate rows, keeps the row with the highest id

Version add-composite-indices-for-links-table

  • apricot-migrations -v add-composite-indices-for-links-table -a or apricot-migrations -v add-composite-indices-for-links-table -o {org_number}
    • Adds composite indices to the links table to improve linking fields on load
    • Removes older single indices that are now covered by the composite.

Version break-out-permission-sets

  • apricot-migrations -v break-out-permission-sets -a or apricot-migrations -v break-out-permission-sets -o {org_number}
  • RBP ORGS ONLY! Resolves an issue in where a single permission set was assigned to multiple role ids. This script fetches that permission set, creates new permission sets, then sets the extra permissions that belong to other roles with the new permission set ids.

Version add-composite-indices-for-document-program-links-table

  • apricot-migrations -v add-composite-indices-for-document-program-links-table -a or apricot-migrations -v add-composite-indices-for-document-program-links-table -o {org_number}
    • Adds composite indices to the document_program_links table to improve load times on program filtered document records
  • Removes older single indices that are now covered by the composite.

Version lookup-list-bp

  • apricot-migrations -v lookup-list-bp -a or apricot-migrations -v lookup-list-bp -o {org_number}
    • Adds guid and designer_restriction to lookuplists.
    • Adds guid and designer_restriction to lookuplist_options.

Version record-audit-indexes

  • apricot-migrations -v record-audit-indexes -a or apricot-migrations -v record-audit-indexes -o {org_number}
    • Adds indexes to the action, creation_user, and creation_time columns in the record audit table.
    • This migration is intended for only orgs that are experiencing problems loading the record audit page.

Version search-values-increase-size

  • apricot-migrations -v search-values-increase-size -a or apricot-migrations -v search-values-increase-size -o {org_number}
    • Alters the search-values column in the saved-searches table from a TEXT column to a MEDIUMTEXT column

Version enrollments-correct-restricted-form

  • apricot-migrations -v enrollments-correct-restricted-form -a or apricot-migrations -v enrollments-correct-restricted-form -o {org_number}
    • Alters APRICOT_REPORTING_FORM_ENROLLMENTS form's restricted column to be -1, so it will no longer be visible when linking

Version add_login_type_column

  • apricot-migrations -v add-login-type-column -s or apricot-migrations -v add-login-type-column -o {org_number}
    • Creates the login_type column with default value 0 in the sessions table

Version create-import-row-id-idx

  • apricot-migrations -v create-import-row-id-idx -a or apricot-migrations -v create-import-row-id-idx -o {org_number}
    • Create an index on the documents table to prevent a row lock from stopping an import.

Version section-guid

  • apricot-migrations -v section-guid -a or apricot-migrations -v section-guid -o {org_number}
    • Creates the guid column for the sections table

Version ra-action-type-update

  • run apricot_migrations -v ra-action-type-update -a or apricot-migrations -v ra-action-type-update -o {org_number}
    • Updates data type of type column in ra_action to ENUM from varchar
  • revert apricot_migrations -v ra-action-type-update -ra or apricot-migrations -v ra-action-type-update -ro {org_number}
    • Reverts data type of type column in ra_action to varchar from ENUM

Version avs-ref-tags-removal

  • apricot-migrations -v avs-ref-tags-removal -a or apricot-migrations -v avs-ref-tags-removal -o {org_number}
    • Removes duplicate ref tag on AVS forms so they do not collide with AHS forms and confuse compliance reporting

Version rule-actions-lookuplist-guid

  • run apricot-migrations -v rule-actions-lookuplist-guid -a or apricot-migrations -v rule-actions-lookuplist-guid -o {org_number}
    • Adds column lookuplist_guid to rules_actions table
  • revert apricot-migrations -v rule-actions-lookuplist-guid -ra or apricot-migrations -v rule-actions-lookuplist-guid -ro {org_number}
    • Reverts addition of column lookuplist_guid to rules_actions table

Version smart-presets

  • apricot-migrations -v smart-presets -a or apricot-migrations -v smart-presets -o {org_number}
    • Creates tables for smart field presets

Version add-smart-list

  • apricot-migrations -v add-smart-list -g
    • This will add a field type and field category data for smart field list

Version operators

  • apricot-migrations -v operators -g
    • Creates tables for operators and operations

Version signature-data-restore

  • apricot-migrations -v signature-data-restore -a or apricot-migrations -v signature-data-restore -o {org_number}
    • This will scan the data tables for signature fields that have missing date/time stamps. Then, it will update the current active row with the signature data, plus use the mod_time to create a date/time stamp.

Version rules-and-alerts-add-time-based-column

  • apricot-migrations -v rules-and-alerts-add-time-based-column -a or apricot-migrations -v rules-and-alerts-add-time-based-column -o {org_number} or apricot-migrations -v rules-and-alerts-add-time-based-column -of <file_path>
    • This will add a column to the ra_rules table for the time based rules feature
    • For Reverting:
      • apricot-migrations -v rules-and-alerts-add-time-based-column -ro {org_number}

Version time-based-condition-update

  • apricot-migrations -v time-based-condition-update -a or apricot-migrations -v time-based-condition-update -o {org_number} or apricot-migrations -v time-based-condition-update -of <file_path>
    • This will modify the subject type column to extend the enum to time based types and allow the subject id to have negative numbers.
    • For Reverting:
      • apricot-migrations -v time-based-condition-update -ro {org_number}

Version report-migrations

  • apricot-migrations -v report-migrations -a or apricot-migrations -v report-migrations -o {org_number}
    • This will create the report migrations tables.
    • For Reverting:
      • apricot-migrations -v report-migrations -ra or apricot-migrations -v report-migrations -ro {org_number}

Version update-scope-descriptor-column

  • apricot-migrations -v update-scope-descriptor-column -a
    • This will update the scope_descriptor VARCHAR to 20.
    • For Reverting:
      • apricot-migrations -v update-scope-descriptor-column -ra

Version attendance-reporting-add-created-modified

  • apricot-migrations -v attendance-reporting-add-created-modified -a or apricot-migrations -v attendance-reporting-add-created-modified -o {org_number}
    • This will create the report migrations tables.
    • For Reverting:
      • apricot-migrations -v attendance-reporting-add-created-modified -ra or apricot-migrations -v attendance-reporting-add-created-modified -ro {org_number}

Version permission-set-id-index-update

  • apricot-migrations -v permission-set-id-index-update -a or apricot-migrations -v permission-set-id-index-update -o {org_number}
    • This will update permission_set_id index.
    • For Reverting:
      • apricot-migrations -v permission-set-id-index-update -ra or apricot-migrations -v permission-set-id-index-update -ro {org_number}

Version linking-cover-index

  • apricot-migrations -v linking-cover-index -a or apricot-migrations -v linking-cover-index -o {org_number}
    • This will add links table cover indexes.
    • For Reverting:
      • apricot-migrations -v linking-cover-index -ra or apricot-migrations -v linking-cover-index -ro {org_number}

Version update-password-settings

  • apricot-migrations -v update-password-settings -a or apricot-migrations -v update-password-settings -o {org_number}
    • This migration is used to update orgs to the new minimum password requirement and force all users to reset their passwords on their next log in.

Version referrals-status-index

  • apricot-migrations -v referrals-status-index -a or apricot-migrations -v referrals-status-index -o {org_number}
    • Add index for the status column on the referrals table
    • For Reverting:
      • apricot-migrations -v referrals-status-index -ra or apricot-migrations -v referrals-status-index -ro {org_number}

Version increase-rule-condition-limit

  • apricot-migrations -v increase-rule-condition-limit -a or apricot-migrations -v increase-rule-condition-limit -o {org_number}
    • Add index for the status column on the referrals table
    • For Reverting:
      • apricot-migrations -v increase-rule-condition-limit -ra or apricot-migrations -v increase-rule-condition-limit -ro {org_number}

Version doc-prog-links-cover-index

  • apricot-migrations -v doc-prog-links-cover-index -a or apricot-migrations -v doc-prog-links-cover-index -o {org_number}
    • Add index for the status column on the referrals table
    • For Reverting:
      • apricot-migrations -v doc-prog-links-cover-index -ra or apricot-migrations -v doc-prog-links-cover-index -ro {org_number}

Version perf-cover-indexes

  • apricot-migrations -v perf-cover-indexes -a or apricot-migrations -v perf-cover-indexes -o {org_number}
    • Add composite index for the documents table
    • For Reverting:
      • apricot-migrations -v perf-cover-indexes -ra or apricot-migrations -v perf-cover-indexes -ro {org_number}

Version session-org-index

  • apricot-migrations -v session-org-index -s
    • Add composite index for the documents table
    • For Reverting:
      • apricot-migrations -v session-org-index -rs

Version drop-index-group-idx

  • apricot-migrations -v drop-index-group-idx -a or apricot-migrations -v drop-index-group-idx -o {org_number}
    • Drop group_idx index on the document_program_links table
    • For Reverting:
      • apricot-migrations -v drop-index-group-idx -ra or apricot-migrations -v drop-index-group-idx -ro {org_number}

Version report-sections-add-optimizer-hint

  • apricot-migrations -v report-sections-add-optimizer-hint -a or -o orgId
    • For Reverting:
      • apricot-migrations -v report-sections-add-optimizer-hint -ra or -ro orgId

Version sessions-mfa-csrf-token

  • apricot-migrations -v sessions-mfa-csrf-token -s
    • Add composite index for the documents table
    • For Reverting:
      • apricot-migrations -v sessions-mfa-csrf-token -rs Version record-action-details
  • apricot-migrations -v record-action-details -a or apricot-migrations -v record-action-details -o {org_number}
    • This will create the record action details table.
    • For Reverting:
      • apricot-migrations -v record-action-details -ra or apricot-migrations -v record-action-details -ro {org_number}

Common Issues and Known Bug Fixes (Local)

Running npm install causing a set() method to error

  • Cause: Using a more recent version of node.
  • Solution:
    • brew unlink node
    • brew install node@10
    • brew link node@10