Skip to content

Commit

Permalink
schema: Use only SQL single quotes for strings
Browse files Browse the repository at this point in the history
New versions of sqlite no longer accept double
quotes for string literals.

On FreeBSD using sqlite 3.45.1 mixxx is unable
to start, even with an empty database, because
the migrations cannot be performed.
  • Loading branch information
saper committed May 20, 2024
1 parent 8f64790 commit a7f8cc4
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions res/schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ reapplying those migrations.
Add file type column.
</description>
<sql>
ALTER TABLE library ADD COLUMN filetype varchar(8) DEFAULT "?";
ALTER TABLE library ADD COLUMN filetype varchar(8) DEFAULT '?';
</sql>
</revision>
<revision version="5">
Expand All @@ -176,15 +176,15 @@ reapplying those migrations.
<sql>
ALTER TABLE library ADD COLUMN timesplayed INTEGER DEFAULT 0;
ALTER TABLE library ADD COLUMN rating INTEGER DEFAULT 0;
ALTER TABLE library ADD COLUMN key varchar(8) DEFAULT "";
ALTER TABLE library ADD COLUMN key varchar(8) DEFAULT '';
UPDATE library SET timesplayed = played;
UPDATE library SET played = 0;

DELETE FROM settings WHERE name="mixxx.db.model.library.header_state";
DELETE FROM settings WHERE name="mixxx.db.model.playlist.header_state";
DELETE FROM settings WHERE name="mixxx.db.model.crate.header_state";
DELETE FROM settings WHERE name="mixxx.db.model.prepare.header_state";
DELETE FROM settings WHERE name="mixxx.db.model.missing.header_state";
DELETE FROM settings WHERE name='mixxx.db.model.library.header_state';
DELETE FROM settings WHERE name='mixxx.db.model.playlist.header_state';
DELETE FROM settings WHERE name='mixxx.db.model.crate.header_state';
DELETE FROM settings WHERE name='mixxx.db.model.prepare.header_state';
DELETE FROM settings WHERE name='mixxx.db.model.missing.header_state';
</sql>
</revision>
<revision version="8" min_compatible="3">
Expand Down Expand Up @@ -305,7 +305,7 @@ reapplying those migrations.
Add composer column to library table.
</description>
<sql>
ALTER TABLE library ADD COLUMN composer varchar(64) DEFAULT "";
ALTER TABLE library ADD COLUMN composer varchar(64) DEFAULT '';
</sql>
</revision>
<revision version="15" min_compatible="3">
Expand Down Expand Up @@ -375,17 +375,17 @@ reapplying those migrations.
Add grouping and album_artist column to library table.
</description>
<sql>
ALTER TABLE Library ADD COLUMN grouping TEXT DEFAULT "";
ALTER TABLE Library ADD COLUMN album_artist TEXT DEFAULT "";
ALTER TABLE Library ADD COLUMN grouping TEXT DEFAULT '';
ALTER TABLE Library ADD COLUMN album_artist TEXT DEFAULT '';
</sql>
</revision>
<revision version="22" min_compatible="3">
<description>
Add grouping and album_artist column to itunes_library table.
</description>
<sql>
ALTER TABLE itunes_library ADD COLUMN grouping TEXT DEFAULT "";
ALTER TABLE itunes_library ADD COLUMN album_artist TEXT DEFAULT "";
ALTER TABLE itunes_library ADD COLUMN grouping TEXT DEFAULT '';
ALTER TABLE itunes_library ADD COLUMN album_artist TEXT DEFAULT '';
</sql>
</revision>
<revision version="23" min_compatible="3">
Expand All @@ -406,7 +406,7 @@ reapplying those migrations.
<sql>
ALTER TABLE library ADD COLUMN coverart_source INTEGER DEFAULT 0;
ALTER TABLE library ADD COLUMN coverart_type INTEGER DEFAULT 0;
ALTER TABLE library ADD COLUMN coverart_location TEXT DEFAULT "";
ALTER TABLE library ADD COLUMN coverart_location TEXT DEFAULT '';
ALTER TABLE library ADD COLUMN coverart_hash INTEGER DEFAULT 0;
</sql>
</revision>
Expand Down

0 comments on commit a7f8cc4

Please sign in to comment.