Upgrades a
GitCentric database to the latest schema.
Syntax
kandoMaintain upgradedb -u <dbadmin> -P <dbpass>
upgradedb Example
After upgrading
GitCentric, upgrade the
GitCentric database with the latest schema. Suppress the confirmation prompt, and specify the database username, password, and connection
string in an external file called
db_vals.txt which exists in a secure directory named
securefiles.
kandoMaintain upgradedb -y -Fc ./securefiles/db_vals.txt
Options
- -u <dbadmin>
- The database administration user. This is the same user name as specified during installation (default is
postgres). If this is required by the command you are using but you do not include it,
kandoMaintain prompts you for it.
- -P <dbpass>
- The database administration password. This is the same user password as specified during installation. If this is required
by the command you are using but you do not include it,
kandoMaintain prompts you for it. If you write scripts that incorporate this option, be sure to secure the file against unauthorized access.
- -c <dbconnectstring>
- The database connection string:
-
jdbc:postgresql://<host>:<port>/<dbname>
If you do not specify
-c for a command that requires it,
kandoMaintain assumes the default value
jdbc:postgresql://localhost:5075/kando. If you do specify
-c, then
jdbc:postgresql:// at a minimum is required. Partial connection strings will have default values automatically supplied. For example, if you
specify
jdbc:postgresql://,
kandoMaintain assumes a
<host> of
localhost, a
<port> value of
5075 and a
<dbname> of
kando.
- -Fc <path>
- The path to a text file (such as
<gc_home>/dbsettings.conf) containing values for three of the parameters used by
kandoMaintain. The contents of this file should include:
-
- DB_USER=<dbadmin>
- Eliminates the need for
-u on the command line.
- DB_PASS=<dbpassword>
- Eliminates the need for
-P on the command line.
- DB_CONNECT=<dbconnectstring>
- Eliminates the need for
-c on the command line.
-
For example:
DB_USER=postgres
DB_PASS=postgres
DB_CONNECT =dbc:postgresql://localhost:5075/kando
Note: The settings and the values accepted by this configuration file can change without notice from release to release.
- -y
- Suppress confirmation prompting for
mkdb,
rmdb,
mvrepos, or
upgradedb.
- -I
- When executing an
upgradedb command, initialize a new database if one does not exist.