andig / videodb

The videoDB media collection software
66 stars 42 forks source link

Upgrade from old database v13 to current one failed #75

Closed Boldie closed 1 year ago

Boldie commented 9 years ago

I have a rather old installation which I try to setup again. Now the database upgrade fails. There are many database entries inside, so populating and reinsatlling from scratch is not an option. The following thing fails:

Upgrading tables...

Old database version: 13

Error upgrading database, try full install instead of upgrade:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT IGNORE INTO `mediatypes` (id, name) VALUES (17,'AVCHD')' at line 2

UPDATE mediatypes SET id=18 WHERE id=17 AND name='CD'
INSERT IGNORE INTO mediatypes (id, name) VALUES (17,'AVCHD');

REPLACE INTO config (opt,value) VALUES ('dbversion', 36);

Performing

mysql> select * from mediatypes;

on my old database will give me:

+----+--------+ | id | name | +----+--------+ | 1 | DVD | | 2 | SVCD | | 3 | VCD | | 4 | CD-R | | 5 | CD-RW | | 6 | VHS | | 7 | DVD-R | | 8 | DVD-RW | | 9 | DVD+R | | 10 | DVD+RW | | 50 | wanted | +----+--------+ 11 rows in set (0.00 sec)

I hope you can give me a hint how to convert the old data.

OK, found the solution, there should be a ';' at the end of the line after UPDATE mediatypes SET id=18 WHERE id=17 AND name='CD' Has nobody tried it before me?

kec2 commented 9 years ago

Are you talking about /install/upgrade.sql line 387 which was updated a year ago? There are a semicolon at the end of that line.

Boldie commented 9 years ago

I downloaded the latest non beta from sourceforge 3.1 and there was no such semicolon inside.

andig commented 9 years ago

Pls download from github. This is the only current source.

Am 27.12.2014 um 15:32 schrieb Boldie notifications@github.com:

I downloaded the latest non beta from sourceforge 3.1 and there was no such semicolon inside.

— Reply to this email directly or view it on GitHub.