Skip to content
This repository has been archived by the owner on Sep 22, 2020. It is now read-only.

Tool for upgrading SC2PTE MongoDB config database from v1 to v2

License

Notifications You must be signed in to change notification settings

lwojcik/sc2pte-panel-db_migration_v1_v2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

db_migration_v1_v2

Node.js script for upgrading user configuration objects to version 2.

Requirements

  • Node.js (latest LTS recommended)
  • two MongoDB document stores ready to be migrated :)

Usage

  • Clone and install:
git clone git@github.com:sc2pte/db_migration_v1_v2.git
cd db_migration_v1_v2
npm install
  • Add a new file called .env and fill it with values containing connection strings for databases to be migrated:
V1_DATABASE_CONNECTION_STRING='mongodb://localhost:27017/oldDb'
V2_DATABASE_CONNECTION_STRING='mongodb://localhost:27017/newDb'
  • Ensure the collection in new database doesn't contain any valuable data because it will be deleted without warning.

  • Start the script:

node index.js

About

Tool for upgrading SC2PTE MongoDB config database from v1 to v2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published