mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-18 12:28:31 +01:00
Move database schema into a subdirectory of data/
This commit is contained in:
parent
c196595060
commit
95556df6aa
@ -2,7 +2,7 @@
|
|||||||
<qresource prefix="/">
|
<qresource prefix="/">
|
||||||
<file>mainwindow.css</file>
|
<file>mainwindow.css</file>
|
||||||
<file>songinfo.css</file>
|
<file>songinfo.css</file>
|
||||||
<file>schema.sql</file>
|
<file>schema/schema.sql</file>
|
||||||
<file>volumeslider-handle_glow.png</file>
|
<file>volumeslider-handle_glow.png</file>
|
||||||
<file>volumeslider-handle.png</file>
|
<file>volumeslider-handle.png</file>
|
||||||
<file>volumeslider-inset.png</file>
|
<file>volumeslider-inset.png</file>
|
||||||
@ -33,21 +33,21 @@
|
|||||||
<file>last.fm/my_neighbours.png</file>
|
<file>last.fm/my_neighbours.png</file>
|
||||||
<file>last.fm/user_purple.png</file>
|
<file>last.fm/user_purple.png</file>
|
||||||
<file>providers/somafm.png</file>
|
<file>providers/somafm.png</file>
|
||||||
<file>schema-1.sql</file>
|
<file>schema/schema-1.sql</file>
|
||||||
<file>schema-2.sql</file>
|
<file>schema/schema-2.sql</file>
|
||||||
<file>nocover.png</file>
|
<file>nocover.png</file>
|
||||||
<file>schema-3.sql</file>
|
<file>schema/schema-3.sql</file>
|
||||||
<file>schema-4.sql</file>
|
<file>schema/schema-4.sql</file>
|
||||||
<file>schema-5.sql</file>
|
<file>schema/schema-5.sql</file>
|
||||||
<file>osd_shadow_corner.png</file>
|
<file>osd_shadow_corner.png</file>
|
||||||
<file>osd_shadow_edge.png</file>
|
<file>osd_shadow_edge.png</file>
|
||||||
<file>schema-6.sql</file>
|
<file>schema/schema-6.sql</file>
|
||||||
<file>schema-7.sql</file>
|
<file>schema/schema-7.sql</file>
|
||||||
<file>tiny-pause.png</file>
|
<file>tiny-pause.png</file>
|
||||||
<file>tiny-start.png</file>
|
<file>tiny-start.png</file>
|
||||||
<file>providers/magnatune.png</file>
|
<file>providers/magnatune.png</file>
|
||||||
<file>schema-8.sql</file>
|
<file>schema/schema-8.sql</file>
|
||||||
<file>schema-9.sql</file>
|
<file>schema/schema-9.sql</file>
|
||||||
<file>icons/22x22/application-exit.png</file>
|
<file>icons/22x22/application-exit.png</file>
|
||||||
<file>icons/22x22/applications-internet.png</file>
|
<file>icons/22x22/applications-internet.png</file>
|
||||||
<file>icons/22x22/configure.png</file>
|
<file>icons/22x22/configure.png</file>
|
||||||
@ -176,21 +176,21 @@
|
|||||||
<file>icons/22x22/document-new.png</file>
|
<file>icons/22x22/document-new.png</file>
|
||||||
<file>icons/32x32/document-new.png</file>
|
<file>icons/32x32/document-new.png</file>
|
||||||
<file>icons/48x48/document-new.png</file>
|
<file>icons/48x48/document-new.png</file>
|
||||||
<file>schema-10.sql</file>
|
<file>schema/schema-10.sql</file>
|
||||||
<file>schema-11.sql</file>
|
<file>schema/schema-11.sql</file>
|
||||||
<file>osd_background.png</file>
|
<file>osd_background.png</file>
|
||||||
<file>icons/22x22/view-fullscreen.png</file>
|
<file>icons/22x22/view-fullscreen.png</file>
|
||||||
<file>icons/32x32/view-fullscreen.png</file>
|
<file>icons/32x32/view-fullscreen.png</file>
|
||||||
<file>icons/48x48/view-fullscreen.png</file>
|
<file>icons/48x48/view-fullscreen.png</file>
|
||||||
<file>schema-12.sql</file>
|
<file>schema/schema-12.sql</file>
|
||||||
<file>schema-13.sql</file>
|
<file>schema/schema-13.sql</file>
|
||||||
<file>icons/22x22/input-keyboard.png</file>
|
<file>icons/22x22/input-keyboard.png</file>
|
||||||
<file>icons/32x32/input-keyboard.png</file>
|
<file>icons/32x32/input-keyboard.png</file>
|
||||||
<file>icons/48x48/input-keyboard.png</file>
|
<file>icons/48x48/input-keyboard.png</file>
|
||||||
<file>icons/22x22/edit-delete.png</file>
|
<file>icons/22x22/edit-delete.png</file>
|
||||||
<file>icons/32x32/edit-delete.png</file>
|
<file>icons/32x32/edit-delete.png</file>
|
||||||
<file>icons/48x48/edit-delete.png</file>
|
<file>icons/48x48/edit-delete.png</file>
|
||||||
<file>schema-14.sql</file>
|
<file>schema/schema-14.sql</file>
|
||||||
<file>icons/22x22/multimedia-player-ipod-mini-blue.png</file>
|
<file>icons/22x22/multimedia-player-ipod-mini-blue.png</file>
|
||||||
<file>icons/22x22/multimedia-player-ipod-mini-gold.png</file>
|
<file>icons/22x22/multimedia-player-ipod-mini-gold.png</file>
|
||||||
<file>icons/22x22/multimedia-player-ipod-mini-green.png</file>
|
<file>icons/22x22/multimedia-player-ipod-mini-green.png</file>
|
||||||
@ -248,14 +248,14 @@
|
|||||||
<file>icons/22x22/drive-removable-media-usb-pendrive.png</file>
|
<file>icons/22x22/drive-removable-media-usb-pendrive.png</file>
|
||||||
<file>icons/32x32/drive-removable-media-usb-pendrive.png</file>
|
<file>icons/32x32/drive-removable-media-usb-pendrive.png</file>
|
||||||
<file>icons/48x48/drive-removable-media-usb-pendrive.png</file>
|
<file>icons/48x48/drive-removable-media-usb-pendrive.png</file>
|
||||||
<file>schema-15.sql</file>
|
<file>schema/schema-15.sql</file>
|
||||||
<file>device-schema.sql</file>
|
<file>schema/device-schema.sql</file>
|
||||||
<file>icons/22x22/go-down.png</file>
|
<file>icons/22x22/go-down.png</file>
|
||||||
<file>icons/32x32/go-down.png</file>
|
<file>icons/32x32/go-down.png</file>
|
||||||
<file>icons/48x48/go-down.png</file>
|
<file>icons/48x48/go-down.png</file>
|
||||||
<file>hypnotoad.gif</file>
|
<file>hypnotoad.gif</file>
|
||||||
<file>blank.ttf</file>
|
<file>blank.ttf</file>
|
||||||
<file>schema-16.sql</file>
|
<file>schema/schema-16.sql</file>
|
||||||
<file>icons/22x22/media-eject.png</file>
|
<file>icons/22x22/media-eject.png</file>
|
||||||
<file>icons/32x32/media-eject.png</file>
|
<file>icons/32x32/media-eject.png</file>
|
||||||
<file>icons/48x48/media-eject.png</file>
|
<file>icons/48x48/media-eject.png</file>
|
||||||
@ -263,7 +263,7 @@
|
|||||||
<file>icons/32x32/ipodtouchicon.png</file>
|
<file>icons/32x32/ipodtouchicon.png</file>
|
||||||
<file>icons/48x48/ipodtouchicon.png</file>
|
<file>icons/48x48/ipodtouchicon.png</file>
|
||||||
<file>icons/32x32/wiimotedev.png</file>
|
<file>icons/32x32/wiimotedev.png</file>
|
||||||
<file>schema-17.sql</file>
|
<file>schema/schema-17.sql</file>
|
||||||
<file>lyrics/ultimate_providers.xml</file>
|
<file>lyrics/ultimate_providers.xml</file>
|
||||||
<file>sidebar_background.png</file>
|
<file>sidebar_background.png</file>
|
||||||
<file>providers/wikipedia.png</file>
|
<file>providers/wikipedia.png</file>
|
||||||
|
@ -426,9 +426,9 @@ QSqlDatabase Database::Connect() {
|
|||||||
void Database::UpdateDatabaseSchema(int version, QSqlDatabase &db) {
|
void Database::UpdateDatabaseSchema(int version, QSqlDatabase &db) {
|
||||||
QString filename;
|
QString filename;
|
||||||
if (version == 0)
|
if (version == 0)
|
||||||
filename = ":/schema.sql";
|
filename = ":/schema/schema.sql";
|
||||||
else
|
else
|
||||||
filename = QString(":/schema-%1.sql").arg(version);
|
filename = QString(":/schema/schema-%1.sql").arg(version);
|
||||||
|
|
||||||
ScopedTransaction t(&db);
|
ScopedTransaction t(&db);
|
||||||
ExecFromFile(filename, db);
|
ExecFromFile(filename, db);
|
||||||
|
@ -82,7 +82,7 @@ int DeviceDatabaseBackend::AddDevice(const Device& device) {
|
|||||||
int id = q.lastInsertId().toInt();
|
int id = q.lastInsertId().toInt();
|
||||||
|
|
||||||
// Create the songs tables for the device
|
// Create the songs tables for the device
|
||||||
QString filename(":device-schema.sql");
|
QString filename(":schema/device-schema.sql");
|
||||||
QFile schema_file(filename);
|
QFile schema_file(filename);
|
||||||
if (!schema_file.open(QIODevice::ReadOnly))
|
if (!schema_file.open(QIODevice::ReadOnly))
|
||||||
qFatal("Couldn't open schema file %s", filename.toUtf8().constData());
|
qFatal("Couldn't open schema file %s", filename.toUtf8().constData());
|
||||||
|
Loading…
Reference in New Issue
Block a user