5.5.6 • Published 7 years ago

ut-cli-sql v5.5.6

Weekly downloads
3
License
Apache-2.0
Repository
github
Last release
7 years ago

UT Cli SQL

The purpose of this module is to make running schema synchronisation script possible without cloning implementation projects.

It is highly recommended to install module as global:

npm i -g ut-cli-sql

ut-cli-sql is working by directly using ut-port-sql module passing a list of schema directories to be processed and database configuration. Configuration file should be located at one of the default locations specified by rc module:

  • command line arguments (parsed by minimist)
  • environment variables prefixed with ${appname}_
    •    or use "__" to indicate nested properties
    •    (e.g. appname_foo__bar__baz => foo.bar.baz)
  • if you passed an option --config file then from that file
  • a local .${appname}rc or the first found looking in ./ ../ ../../ ../../../ etc.
  • $HOME/.${appname}rc
  • $HOME/.${appname}/config
  • $HOME/.config/${appname}
  • $HOME/.config/${appname}/config
  • /etc/${appname}rc
  • /etc/${appname}/config
  • the defaults object you passed in.

The module is tested by using convention $HOME/.${appname}/config with json config as shown in example:

{
    "log": true,
    "logLevel": "",
    "id": "",
    "type": "",
    "createTT": true,
    "db": {
        "user": "switch",
        "password": "switch",
        "server": "devdb08",
        "database": "impl-test-db"
    },
    "schema": [
        { "path" : "... path to project directory ... /ut-core/schema" },
        { "path" : "... path to project directory ... /ut-document/schema" },
        { "path" : "... path to project directory ... /ut-customer/schema" },
        { "path" : "... path to project directory ... /ut-user/schema" },
        { "path" : "... path to project directory ... /impl-test/db/schema" }
    ]
}

Once the module is installed as global and configuration is set you just need to run:

ut-sql
5.5.6

7 years ago

5.5.5

7 years ago

5.5.4

7 years ago

5.5.3

7 years ago

5.5.2

7 years ago

5.5.1

7 years ago

5.5.0

7 years ago

5.4.6

7 years ago

5.4.5

8 years ago

5.4.4

8 years ago

5.4.3

8 years ago