Open topic with navigation
Sometimes the schema of the Media Server database must change in order to provide new features or enhancements. If you are using an internal database, any schema changes are applied automatically. If you are using a database that is hosted on an external database server, you must run an upgrade script when you upgrade Media Server.
If you are using HPE Image Server or HPE Video Server 10.x with either an internal or external database, upgrade to Media Server 11.0 first, and then upgrade to the latest version.
HPE provides scripts to upgrade to the latest version of the database schema from each of the earlier versions. The following table describes the schema changes for the Media Server database.
|Schema version||Media Server version||Script to run to upgrade to latest schema|
|5||11.4||You are using the latest database schema|
Running one of these scripts copies your training data and adds it to the database using the latest schema. These scripts do not remove training data stored using earlier schema versions. This means that you can continue to use the database with an earlier version of Media Server. Be aware that if you use multiple versions of Media Server, any new training you perform is only added to the database using the schema for the Media Server that performs the training. For example, if you upgrade from schema version 3 to schema version 4, you can perform training with Media Server 11.0.x and Media Server 11.2.x. However, any training you perform with Media Server 11.2.x is available only to Media Server version 11.2.x, and any training that you perform using Media Server 11.0.x is available only to Media Server version 11.0.x.
After a successful schema upgrade you can remove data stored using earlier schema versions. This saves storage space on the database server. HPE provides scripts to remove the data, named
mysql-purge_before_vX.sql (for MySQL databases) or
postgres-purge_before_vX.sql (for PostgreSQL databases), where
X is the oldest schema version you want to retain in the database. For example, if you upgrade from schema version 3 to schema version 4, and do not want to use Media Server versions earlier than 11.2.x again, you can run
postgres-purge_before_v4.sql to remove schema version 3 and earlier from the database.
To upgrade the database schema
Run the corresponding upgrade script for your database, using the same command syntax as used to create the database (see the following topics):
Run the upgrade script using the
psql command-line tool (for PostgreSQL databases) or the
mysql command-line tool (for MySQL databases). The script contains instructions that are only supported when the script runs through these tools.
Xis the oldest schema version you want to retain in the database.