0.0.35 • Published 7 years ago

mongovc v0.0.35

Weekly downloads
1
License
ISC
Repository
-
Last release
7 years ago

mongovc

(mongo Version Control)

node module for mongodb collection version control support

Source codes are versioned for the team to collaborate easily and safely. Databases needs to be given the same collaboration procedure as business logic has been increasingly dependent on data. A lot of teams dump, restore and merge their versions of databases manually. Which leads to changes not being applied and causes unexpected behaviours.

mongovc aims to version mongodb collections properly so the need to copy-paste dumps can be obsoleted.

Features

  • Dump MongoDB collections as a readable files
  • Restore MongoDB collections from files
  • Create collection groups to specify which collections should be dump or restored
  • Specify filter per collection
  • Support Index Backup
  • Automatically dump collections on stat of git
  • Automatically dump collections on before pull of git to check for conflicts
  • Automatically restore collections after pull if there are no conflicts
  • Connect with Authentication
  • Deploy to a database
    • Run scripts before deployment
    • Run scripts after deployment
    • Specify deployment profiles

Install

npm install mongovc -g

if this is a new project, you should --init

mongovc --init

How to use

Since automatic dump and restore is not yet supported, you can run the commands yourself for now.

Help

show everything you can do with mongovc

mongovc --help

dump collections

mongovc --dump

restore collections

mongovc --restore

specifying collections to dump/restore

mongovc --restore <group name>
mongovc --dump <group name>

you can specify groups in the mongovc.config.js

if group is not specified, it will use what is indicated in collections

initialize dev configuration

mongovc --init-dev

Configuration

mongovc.config.js

{
  "database": "<databaseName>",
  "host": "localhost", //optional, default
  "port": "27017", //optional, default
  "collections": ["Accounts", "Stores"],
  "groups": {
    "all": [],
    "structure": [],
    "generated": []
  }
}

Dev Configuration

dev.mongovc.config.js

Same format with the main configuration. This file will override the main config's field that are specified. All fields in this file are optional. This is .gitignored so everyone can specify their own database and other configurations without conflicting with others. Can be automatically generated

License

Copyright (c) 2017 Mark Louie Almeda

Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

0.0.35

7 years ago

0.0.34

7 years ago

0.0.33

7 years ago

0.0.32

7 years ago

0.0.31

7 years ago

0.0.30

7 years ago

0.0.29

7 years ago

0.0.28

7 years ago

0.0.26

7 years ago

0.0.25

7 years ago

0.0.24

7 years ago

0.0.23

7 years ago

0.0.22

7 years ago

0.0.21

7 years ago

0.0.20

7 years ago

0.0.19

7 years ago

0.0.18

7 years ago

0.0.17

7 years ago

0.0.16

7 years ago

0.0.15

7 years ago

0.0.14

7 years ago

0.0.13

7 years ago

0.0.12

7 years ago

0.0.11

7 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago