geuma / pDLNA

perl DLNA MediaServer
https://www.pdlna.org
GNU General Public License v3.0
30 stars 8 forks source link

database preparation problem #8

Closed geuma closed 11 years ago

geuma commented 11 years ago

root@mediaserver:~# /etc/init.d/rc.pDLNA restart Stopping pDLNA ... Starting pDLNA ... DBD::SQLite::db do failed: table METADATA already exists at PDLNA/Database.pm line 87. DBD::SQLite::st execute failed: constraint failed column KEY is not unique at PDLNA/Database.pm line 222. constraint failed column KEY is not unique at PDLNA/Database.pm line 222.

geuma commented 11 years ago

it might depend on the perl modul version

some versions return "main"."METADATA" and other "METADATA"

geuma commented 11 years ago

instead of using the tables() function we should use a seperate query:

SELECT name FROM sqlite_master WHERE type = "table";

geuma commented 11 years ago

fixed in commit 9aa33ffdce34bd9def38e7ff3e5451690673ff2b

geuma commented 11 years ago

additonal fix in commit 5d641d4ad8dbf15e578d388ede7fad970f7e7dad