[mythtv-commits] Ticket #12979: DB column defaults are invalid
MythTV
noreply at mythtv.org
Wed Jan 18 14:57:03 UTC 2017
#12979: DB column defaults are invalid
--------------------------------------+-------------------------
Reporter: stuarta | Owner:
Type: Bug Report - General | Status: new
Priority: minor | Milestone: 29.0
Component: MythTV - General | Version: Master Head
Severity: medium | Keywords:
Ticket locked: 0 |
--------------------------------------+-------------------------
Steps to reproduce (on master)
1. Duplicate existing table
{{{
mysql> create table channel2 like channel;
ERROR 1067 (42000): Invalid default value for 'last_record'
}}}
2. Review existing table defaults..
{{{
mysql> show create table channel\G
*************************** 1. row ***************************
Table: channel
Create Table: CREATE TABLE `channel` (
`chanid` int(10) unsigned NOT NULL DEFAULT '0',
`channum` varchar(10) NOT NULL DEFAULT '',
`freqid` varchar(10) DEFAULT NULL,
`sourceid` int(10) unsigned DEFAULT NULL,
`callsign` varchar(20) NOT NULL DEFAULT '',
`name` varchar(64) NOT NULL DEFAULT '',
`icon` varchar(255) NOT NULL DEFAULT '',
`finetune` int(11) DEFAULT NULL,
`videofilters` varchar(255) NOT NULL DEFAULT '',
`xmltvid` varchar(255) NOT NULL DEFAULT '',
`recpriority` int(10) NOT NULL DEFAULT '0',
`contrast` int(11) DEFAULT '32768',
`brightness` int(11) DEFAULT '32768',
`colour` int(11) DEFAULT '32768',
`hue` int(11) DEFAULT '32768',
`tvformat` varchar(10) NOT NULL DEFAULT 'Default',
`visible` tinyint(1) NOT NULL DEFAULT '1',
`outputfilters` varchar(255) NOT NULL DEFAULT '',
`useonairguide` tinyint(1) DEFAULT '0',
`mplexid` smallint(6) DEFAULT NULL,
`serviceid` mediumint(8) unsigned DEFAULT NULL,
`tmoffset` int(11) NOT NULL DEFAULT '0',
`atsc_major_chan` int(10) unsigned NOT NULL DEFAULT '0',
`atsc_minor_chan` int(10) unsigned NOT NULL DEFAULT '0',
`last_record` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`default_authority` varchar(32) NOT NULL DEFAULT '',
`commmethod` int(11) NOT NULL DEFAULT '-1',
`iptvid` smallint(6) unsigned DEFAULT NULL,
PRIMARY KEY (`chanid`),
KEY `channel_src` (`channum`,`sourceid`),
KEY `sourceid` (`sourceid`,`xmltvid`,`chanid`),
KEY `visible` (`visible`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8
1 row in set (0.00 sec)
}}}
Problematic column is
{{{
`last_record` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
}}}
--
Ticket URL: <https://code.mythtv.org/trac/ticket/12979>
MythTV <http://www.mythtv.org>
MythTV Media Center
More information about the mythtv-commits
mailing list