How to upgrade your Kontrollbase schema

12 January 2010 | announcement | Tags: , , , ,

If you have recently downloaded or checked out a new version of Kontrollbase and find that you need to upgrade the schema from a previous version then you will probably find this post useful. If you don’t know if you need to upgrade then you probably do, so read along for a bit just to make sure. Keep in mind that if you do an SVN update to the latest rev and have not yet made the schema changes your app will not work after login since it will be looking for tables that do not yet exist. Here’s how to make those tables exist.

There are two main changes in the schema between the previous release (rev225) and the current release (rev 270/271). If you are upgrading from a release older than 225 then you will probably want to see item number three as well.

  1. analytics_overview_data table that serves data for the environment overview statistics page. This is actually a materialized view.
  2. view_analytics_overview view table that stores the current data that script pull from to populate the materialized view from item #1 above. This table has overview content from the server_statistics table in a convenient view.
  3. A list of ALTER TABLE commands to solve an issue with BIGINT UNSIGNED data values in the server_statistics table.

To be convenient to the installation process, all of those changes have been located in a separate file in revision 270, and then merged into the main schema creation file in revision 271. So, if you have downloaded revision 270 you can just apply the secondary schema file located in install/sql/ to ensure your schema is updated with the new changes. If you have downloaded revision 271 you will need to execute the secondary file which you can find here: – applying the changes is simple: “mysql –user=[kontrollbase user] -p kontrollbase < [filename.sql]” – if you are applying the ALTER commands it might take a while to process if you have a large table or many hundreds of thousands of rows. Be patient.

That’s all! If you have any questions or need help please contact support via the many methods:

Comments are closed.