Command line module.
Check database structure for application domain. Generate DDL (both create and alter) if need and optionally run it
WARNING: do not run this command on production database in automatic mode - always review SQL script manually before run
Example
/from a command line
>ub cmd/generateDDL -u admin -p admin -autorun
//from a script
var DDLGenerator = require('cmd/generateDDL');
var options = {
host: "http://localhost:888",
user: "admin",
pwd: "admin",
out: process.cwd(),
autorun: true
};
DDLGenerator(options);
Methods
runDDLGenerator(conn, appConfigopt, inEntities, inModels, outputPath)
inner
Arguments:
-
conn (UBConnection)
-
[appConfig] (Object)  Optional server config application section (used in auto mode to execute DDL statements)
-
inEntities (String)
-
inModels (String)
-
outputPath (String)
formatAsText(connectionName, connResult)
inner
Format a result of runDDLGenerator as a single SQL file
Arguments:
conn (UBConnection)
[appConfig] (Object)  Optional server config application section (used in auto mode to execute DDL statements)
inEntities (String)
inModels (String)
outputPath (String)