An implementation of the db-script-generator in node.js
usage:
var scriptGen = require("db-script-gen.js");
scriptGen.generate('myreleaseId', 'inputFolder', 'outputFolder', [ 'EU', 'NA', 'AP' ]);
output:
Will merge the contents of the inputFolder into a single script, and use it to generate three files in the output folder:
- webdb_EU_myreleaseId.sql
- webdb_NA_myreleaseId.sql
- webdb_AP_myreleaseId.sql
These are ready to be run on their respective databases.
inputs
-
releaseId
: any string which should identify this release (e.g. myapplication_1_2_0) -
inputFolder
: the folder with the sprocs that you want to deploy. These can be.prc
or.sql
files -
outputFolder
: self explanatory -
regions
: an array containing the regions for which deployment scripts should be generated. Valid values are:[ 'EU', 'NA', 'AP' ]