[mythtv-users] Migrating database from 0.18 to 0.19 (SQL hacking?)
Cory Papenfuss
papenfuss at juneau.me.vt.edu
Wed May 3 16:57:46 EDT 2006
Hey all... finally getting around to updating my mythbox to a
newer version. Trouble is, the usual procedure:
$ grep "INSERT INTO record " mythtv_backup.sql > restore.sql
$ grep "INSERT INTO recorded " mythtv_backup.sql >> restore.sql
$ grep "INSERT INTO oldrecorded " mythtv_backup.sql >> restore.sql
$ grep "INSERT INTO recordedmarkup " mythtv_backup.sql >> restore.sql
$ mysql -u mythtv -pmythtv mythconverg < restore.sql
doesn't work anymore. I've read the archives and noticed how the
mysqldump now back-ticks the 'recorded' etc so these lines are necessary:
$ grep "INSERT INTO \`record\` " mythtv_backup.sql > restore.sql
$ grep "INSERT INTO \`recorded\` " mythtv_backup.sql >> restore.sql
$ grep "INSERT INTO \`oldrecorded\` " mythtv_backup.sql >> restore.sql
$ grep "INSERT INTO \`recordedmarkup\` " mythtv_backup.sql >> restore.sql
Trouble is, this part:
$ mysql -u mythtv -pmythtv mythconverg < restore.sql
now barfs with:
ERROR 1136 (21S01) at line 1: Column count doesn't match value count at row 1
After reading:
http://www.gossamer-threads.com/lists/mythtv/users/141303?search_string=grep%20INSERT%20;#141303
it appears that there's a new field in there. What's the method
for adding it in? I'm not excited about hacking up 233706 lines in my
3-year old database. Hopefully there's a good way...
-Cory
--
*************************************************************************
* Cory Papenfuss, Ph.D., PPSEL-IA *
* Electrical Engineering *
* Virginia Polytechnic Institute and State University *
*************************************************************************
More information about the mythtv-users
mailing list