[mythtv-commits] mythtv/master commit: 81f3a7e05 by Michael T. Dean (sphery)
noreply at mythtv.org
Thu Dec 30 03:16:53 UTC 2010
Author: Michael T. Dean <mdean at mythtv.org>
Change Date: 2010-12-29T19:13:35-08:00
Push Date: 2010/12/29 19:16:48 -0800
New Revision: 81f3a7e0586df4ca9c0880480a30f9b3faa1036b
Fix timestamp column definitions.
The InitializeMythSchema() function had improper definitions for four TIMESTAMP
columns due to a mysqldump issue. The columns were defined with DEFAULT
CURRENT_TIMESTAMP, but without ON UPDATE CURRENT_TIMESTAMP, so those users who
created new databases in the last 2 years got slightly incorrect schemas. The
effect of the issue is small (or, put another way--if you haven't noticed any
problems in the last 2 years, don't worry about it, now; you can pick up the
fix when you upgrade to 0.25 :).
The existing code in doUpgradeTVDatabaseSchema() is updated to explicitly
specify TIMESTAMP columns as DEFAULT CURRENT_TIMESTAMP ON UPDATE
CURRENT_TIMESTAMP where we were previously relying on MySQL defaults to set
those properties. This should make it easier to identify the desired
configuration without having to know MySQL defaults.
And, the comment for how to create a new initial database schema is updated to
ensure the same issue doesn't happen, again (and for current mysqldump
--ignore-table syntax requirements). This change also means that AUTO_INCREMENT
is now handled properly, and the SQL will includes ENGINE and DEFAULT_CHARSET.
I plan to do an initial schema rollup this cycle, and will discuss the idea of
including ENGINE and DEFAULT_CHARSET before actually doing so. The filter is
also updated to remove the character set comments from the mysql output.
Finally, a DB update is included which fixes the columns in existing databases.
Thanks to [R] on IRC for noticing that some columns weren't updating properly
on his created-from-scratch database.
More information about the mythtv-commits