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.
Note: Media Server versions 11.1 and later do not include upgrade scripts to upgrade from database schema used by Media Server 10.x. If you are using Media 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 |
---|---|---|
3 | 11.0.x | You are using the latest database schema |
2 | 10.11.x | mysql-upgrade_from_v2.sql (for MYSQL databases)postgres-upgrade_from_v2.sql (for PostgreSQL databases)
|
1 | 10.10.x | mysql-upgrade_from_v1.sql (for MYSQL databases)postgres-upgrade_from_v1.sql (for PostgreSQL databases)
|
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 1 to schema version 2, you can perform training with Media Server 10.10.x and Media Server 10.11.x. However, any training you perform with Media Server 10.10.x is available only to Media Server version 10.10.x, and any training that you perform using Media Server 10.11.x is available only to Media Server version 10.11.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 1 to schema version 2, and do not want to use Media Server 10.10.x again, you can run mysql-purge_before_v2.sql
or postgres-purge_before_v2.sql
to remove schema version 1 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):
Note: 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.
mysql-purge_before_vX.sql
, or postgres-purge_before_vX.sql
, where X
is the oldest schema version you want to retain in the database.
|