mongoladdu

MongoDB migration manager


Keywords
mongodb, migration
License
MIT
Install
pip install mongoladdu==0.0.4

Documentation

mongoladdu

How to install

  • use pip

    $ pip install mongoladdu
  • from source code

    $ python setup.py install

How to use it

  1. create folder named migrations
  2. create config.yml file with in migrations folder and place your environment specific configurations
dev:
  host: localhost
  port: 27017
  db_name: dev_db
  1. create migration scripts with in migrations folder. file names should follow patter <index>_<description>.py
def run(db):
    db.Test.insert({'name': 'value'})
  1. run migrate mongoladdu <env> run
mongoladdu dev run
  1. Alternate options for providing configuration

can be directly invoked from python code using, MongoLaddu().run_for_config('localhost', 27017, 'dev_db')