Ad Widget

Collapse

PATCH: MySQL services_times table - 1.3.8

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • skeenan
    Junior Member
    • May 2007
    • 2

    #1

    PATCH: MySQL services_times table - 1.3.8

    When inserting a new IT Service time definition using a mysql db, the code does not insert a timeid, and timeid defaults to 0; since it is a primary key, we need to either auto increment. Here's the correct alter table and create table statements:

    Code:
    ALTER TABLE services_times MODIFY timeid  bigint(20) unsigned NOT NULL  AUTO_INCREMENT;
    and:
    Code:
    CREATE TABLE `services_times` (
      `timeid` bigint(20) unsigned NOT NULL auto_increment,
      `serviceid` bigint(20) unsigned NOT NULL default '0',
      `type` int(11) NOT NULL default '0',
      `ts_from` int(11) NOT NULL default '0',
      `ts_to` int(11) NOT NULL default '0',
      `note` varchar(255) NOT NULL default '',
      PRIMARY KEY  (`timeid`),
      KEY `services_times_times_1` (`serviceid`,`type`,`ts_from`,`ts_to`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    The patch is incorrect Thanks anyway for reporting this! Fixed!
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    Working...