Better database version tracking

Discussion forum about Anuko Time Tracker

Better database version tracking

Postby Nik » Thu Feb 22, 2018 2:30 pm

I think it is time to improve Time Tracker database version tracking.

Current problems:

1) Database version is not stored anywhere. What we have in the footer is code version, which is usually different.
2) Database structure update process is currently awkward. It is prone to errors. People not doing the rights steps, or doing wrong steps.

It looks like we have to store DB structure version in the database itself and use it during updates - like to determine what the update should do.
Posts: 398
Joined: Wed May 26, 2010 5:55 pm

Re: Better database version tracking

Postby wrc » Tue Feb 27, 2018 11:22 pm

How about an additional database table to keep site configuration. For example:

Code: Select all
# Structure for table tt_site_config. This table stores configuration data
# for Time Tracker site as a whole.
# For example, database version, site language, etc.
CREATE TABLE `tt_site_config` (
  `param_name` varchar(32) NOT NULL,              # parameter name
  `param_value` text default NULL,                # parameter value
  `created` datetime default CURRENT_TIMESTAMP,   # creation time
  `updated` datetime ON UPDATE CURRENT_TIMESTAMP, # modification time
  PRIMARY KEY  (`param_name`)

INSERT INTO `tt_site_config` (`param_name`, `param_value`) VALUES ('version_db', '1.17.31'); # TODO: change when structure changes.
Posts: 227
Joined: Tue May 25, 2010 8:30 pm

Return to Time Tracker

Who is online

Users browsing this forum: No registered users and 1 guest