The currently supported method is to drop all tables and reload from a checkpoint.
Upgrading Without Starting Over
When the Helix server is upgraded, some schema changes may be necessary.
The quickest way is to generate a new empty schema and compare the new to old:
- Make a copy of your configuration file and change the TABLE_PREFIX within
- Run "p4todb --init-and-quit --config-file <new-config-file>"
- You will now have two schemas of tables and two rows in table P4TODB_CFG
Compare the values in the column P4TODB_CFG.TABLES between rows. The TABLES column contains a "|" separated list of "<table> <version>" This will guide you to the tables you need to ALTER, create, or ignore.
Note that many tables do not change between releases. If your TABLES column contains the same list of table "<version>" in both releases then no further changes are necessary.
If your config file uses DB_NO_REPL and the new TABLE is of no interest, simply add the table to DB_NO_REPL
- Compare the old table and new table definitions for the tables you replicate: ALTER the database old table definition as required
- New tables may also be created or ignored. To create, you can rename the new table (with the new TABLE_PREFIX) to use the original config file's TABLE_PREFIX.
- Update the old P4TODB.TABLES column of your original replication row to have the new version numbers in your new row.
- Cleanup: drop the new (unused) db objects and remove the new row from P4TODB_CFG
Restart replication with your original configuration file.
For understanding any new tables or column additions, see the Helix Server Schema Documentation. The link is https://www.perforce.com/perforce/rXY.Z/schema/ , where XY.Z is the Helix server version. For example, https://www.perforce.com/perforce/r17.2/schema/
To view the new DDL., you can run:
p4todb.[bat|sh] --config-file <file> --print-ddl