config-migrate

0.2.1 • Public • Published

config-migrate

Tool (built as node module) to track, manage and apply structural/data changes to your json config files

    
    +---+                                                 +---+                     
    +---------------------+       +---------------+       +----------------------+
    |                     |       |               |       |                      |
    | Bahmni Config Files | +-----> config-migrate| +---> | Updated Config Files |
    |                     |       |               |       |                      |
    +---------------------+       +-------^-------+       +----------------------+
                                          |                                       
                                          |                                       
                                          +                                       
                                 |---|                                          
                                 |-----------------+                              
                                 |                 |                              
                                 | Migration Files |                              
                                 |                 |                              
                                 +-----------------+                              
    

Where,

  • Config Files - Your config files which needs to be updated
  • Migration Files - All the migration javascript files to be run

Migration Files

The migration files follow a naming convention

V1__convert_arrays_to_maps.js

Where,

  • V - Prefix
  • __ - separator
  • convert_arrays_to_maps - name of the migration

The migration can use lodash methods in it

Config Files

When the migrations are run, a file named 'migration-run-log.txt' will be generated to remember the already run migrations. Keep this file versioned along with other config files

Usage

  1. npm install -g config-migrate
  2. Run the following command

config-migrate config_folder_full_path migration_files_folder_full_path

Readme

Keywords

none

Package Sidebar

Install

npm i config-migrate

Homepage

bahmni.org

Weekly Downloads

14

Version

0.2.1

License

none

Last publish

Collaborators

  • bahmni
  • sudhakar82