Skip to content

Commit

Permalink
Use consistent case for column types in schema.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
xeruf committed Jul 9, 2020
1 parent 1b7bdb4 commit db446ad
Showing 1 changed file with 64 additions and 64 deletions.
128 changes: 64 additions & 64 deletions res/schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,58 +29,58 @@ METADATA
needs_verification INTEGER);

CREATE TABLE IF NOT EXISTS LibraryHashes (
directory_path VARCHAR(256) primary key,
directory_path VARCHAR(256) PRIMARY KEY,
hash INTEGER,
directory_deleted INTEGER);

CREATE TABLE IF NOT EXISTS library (
id INTEGER primary key AUTOINCREMENT,
id INTEGER PRIMARY KEY AUTOINCREMENT,
artist varchar(48), title varchar(48),
album varchar(48), year varchar(16),
genre varchar(32), tracknumber varchar(3),
location varchar(512) REFERENCES track_locations(location),
comment varchar(20), url varchar(256),
duration float,
bitrate integer, samplerate integer,
cuepoint integer, bpm float,
wavesummaryhex blob,
channels integer,
duration FLOAT,
bitrate INTEGER, samplerate INTEGER,
cuepoint INTEGER, bpm FLOAT,
wavesummaryhex BLOB,
channels INTEGER,
datetime_added DEFAULT CURRENT_TIMESTAMP,
mixxx_deleted integer,
played integer);
mixxx_deleted INTEGER,
played INTEGER);

CREATE TABLE Playlists (
id INTEGER primary key,
id INTEGER PRIMARY KEY,
name varchar(48),
position INTEGER,
hidden INTEGER DEFAULT 0 NOT NULL,
date_created datetime,
date_modified datetime);

CREATE TABLE PlaylistTracks (
id INTEGER primary key,
id INTEGER PRIMARY KEY,
playlist_id INTEGER REFERENCES Playlists(id),
track_id INTEGER REFERENCES library(id),
position INTEGER);

CREATE TABLE IF NOT EXISTS cues (
id integer PRIMARY KEY AUTOINCREMENT,
track_id integer NOT NULL REFERENCES library(id),
type integer DEFAULT 0 NOT NULL,
position integer DEFAULT -1 NOT NULL,
length integer DEFAULT 0 NOT NULL,
hotcue integer DEFAULT -1 NOT NULL,
label text DEFAULT '' NOT NULL);
id INTEGER PRIMARY KEY AUTOINCREMENT,
track_id INTEGER NOT NULL REFERENCES library(id),
type INTEGER DEFAULT 0 NOT NULL,
position INTEGER DEFAULT -1 NOT NULL,
length INTEGER DEFAULT 0 NOT NULL,
hotcue INTEGER DEFAULT -1 NOT NULL,
label TEXT DEFAULT '' NOT NULL);

CREATE TABLE IF NOT EXISTS crates (
id integer PRIMARY KEY AUTOINCREMENT,
id INTEGER PRIMARY KEY AUTOINCREMENT,
name varchar(48) UNIQUE NOT NULL,
count integer DEFAULT 0,
show integer DEFAULT 1);
count INTEGER DEFAULT 0,
show INTEGER DEFAULT 1);

CREATE TABLE IF NOT EXISTS crate_tracks (
crate_id integer NOT NULL REFERENCES crates(id),
track_id integer NOT NULL REFERENCES library(id),
crate_id INTEGER NOT NULL REFERENCES crates(id),
track_id INTEGER NOT NULL REFERENCES library(id),
UNIQUE (crate_id, track_id));

</sql>
Expand All @@ -91,7 +91,7 @@ METADATA
track's tags have been parsed.
</description>
<sql>
ALTER TABLE library ADD COLUMN header_parsed integer DEFAULT 0;
ALTER TABLE library ADD COLUMN header_parsed INTEGER DEFAULT 0;
</sql>
</revision>
<revision version="3">
Expand All @@ -103,27 +103,27 @@ METADATA
ALTER TABLE library RENAME TO library_old;

CREATE TABLE IF NOT EXISTS library (
id INTEGER primary key AUTOINCREMENT,
id INTEGER PRIMARY KEY AUTOINCREMENT,
artist varchar(64),
title varchar(64),
album varchar(64),
year varchar(16),
genre varchar(64),
tracknumber varchar(3),
location integer REFERENCES track_locations(location),
location INTEGER REFERENCES track_locations(location),
comment varchar(256),
url varchar(256),
duration float,
bitrate integer,
samplerate integer,
cuepoint integer,
bpm float,
wavesummaryhex blob,
channels integer,
duration FLOAT,
bitrate INTEGER,
samplerate INTEGER,
cuepoint INTEGER,
bpm FLOAT,
wavesummaryhex BLOB,
channels INTEGER,
datetime_added DEFAULT CURRENT_TIMESTAMP,
mixxx_deleted integer,
played integer,
header_parsed integer DEFAULT 0);
mixxx_deleted INTEGER,
played INTEGER,
header_parsed INTEGER DEFAULT 0);

INSERT INTO library (id, artist, title, album, year, genre, tracknumber, location, comment, url, duration, bitrate, samplerate, bpm, cuepoint, bpm, wavesummaryhex, channels, datetime_added, mixxx_deleted, played, header_parsed) SELECT id, artist, title, album, year, genre, tracknumber, location, comment, url, duration, bitrate, samplerate, bpm, cuepoint, bpm, wavesummaryhex, channels, datetime_added, mixxx_deleted, played, header_parsed from library_old;

Expand Down Expand Up @@ -151,16 +151,16 @@ METADATA
Added a ReplayGain Column.
</description>
<sql>
ALTER TABLE library ADD COLUMN replaygain float DEFAULT 0;
ALTER TABLE library ADD COLUMN replaygain FLOAT DEFAULT 0;
</sql>
</revision>
<revision version="7" min_compatible="3">
<description>
Add timesplayed and rating column. Reset header state.
</description>
<sql>
ALTER TABLE library ADD COLUMN timesplayed integer DEFAULT 0;
ALTER TABLE library ADD COLUMN rating integer DEFAULT 0;
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 "";
UPDATE library SET timesplayed = played;
UPDATE library SET played = 0;
Expand All @@ -178,23 +178,23 @@ METADATA
</description>
<sql>
CREATE TABLE IF NOT EXISTS itunes_library (
id INTEGER primary key,
id INTEGER PRIMARY KEY,
artist varchar(48), title varchar(48),
album varchar(48), year varchar(16),
genre varchar(32), tracknumber varchar(3),
location varchar(512),
comment varchar(60),
duration integer,
bitrate integer,
bpm integer,
rating integer);
duration INTEGER,
bitrate INTEGER,
bpm INTEGER,
rating INTEGER);

CREATE TABLE IF NOT EXISTS itunes_playlists (
id INTEGER primary key,
id INTEGER PRIMARY KEY,
name varchar(100) UNIQUE);

CREATE TABLE IF NOT EXISTS itunes_playlist_tracks (
id INTEGER primary key AUTOINCREMENT,
id INTEGER PRIMARY KEY AUTOINCREMENT,
playlist_id INTEGER REFERENCES itunes_playlist(id),
track_id INTEGER REFERENCES itunes_library(id));
</sql>
Expand All @@ -205,24 +205,24 @@ METADATA
</description>
<sql>
CREATE TABLE IF NOT EXISTS traktor_library (
id INTEGER primary key AUTOINCREMENT,
id INTEGER PRIMARY KEY AUTOINCREMENT,
artist varchar(48), title varchar(48),
album varchar(48), year varchar(16),
genre varchar(32), tracknumber varchar(3),
location varchar(512) UNIQUE,
comment varchar(60),
duration integer,
bitrate integer,
bpm float,
duration INTEGER,
bitrate INTEGER,
bpm FLOAT,
key varchar(6),
rating integer
rating INTEGER
);
CREATE TABLE IF NOT EXISTS traktor_playlists (
id INTEGER primary key,
id INTEGER PRIMARY KEY,
name varchar(100) UNIQUE
);
CREATE TABLE IF NOT EXISTS traktor_playlist_tracks (
id INTEGER primary key AUTOINCREMENT,
id INTEGER PRIMARY KEY AUTOINCREMENT,
playlist_id INTEGER REFERENCES traktor_playlist(id),
track_id INTEGER REFERENCES traktor_library(id)
);
Expand All @@ -233,8 +233,8 @@ METADATA
Playlist and crate locks
</description>
<sql>
ALTER TABLE crates ADD COLUMN locked integer DEFAULT 0;
ALTER TABLE playlists ADD COLUMN locked integer DEFAULT 0;
ALTER TABLE crates ADD COLUMN locked INTEGER DEFAULT 0;
ALTER TABLE playlists ADD COLUMN locked INTEGER DEFAULT 0;
</sql>
</revision>
<revision version="11" min_compatible="3">
Expand All @@ -243,24 +243,24 @@ METADATA
</description>
<sql>
CREATE TABLE IF NOT EXISTS rhythmbox_library (
id INTEGER primary key AUTOINCREMENT,
id INTEGER PRIMARY KEY AUTOINCREMENT,
artist varchar(48), title varchar(48),
album varchar(48), year varchar(16),
genre varchar(32), tracknumber varchar(3),
location varchar(512) UNIQUE,
comment varchar(60),
duration integer,
bitrate integer,
bpm float,
duration INTEGER,
bitrate INTEGER,
bpm FLOAT,
key varchar(6),
rating integer
rating INTEGER
);
CREATE TABLE IF NOT EXISTS rhythmbox_playlists (
id INTEGER primary key AUTOINCREMENT,
id INTEGER PRIMARY KEY AUTOINCREMENT,
name varchar(100) UNIQUE
);
CREATE TABLE IF NOT EXISTS rhythmbox_playlist_tracks (
id INTEGER primary key AUTOINCREMENT,
id INTEGER PRIMARY KEY AUTOINCREMENT,
playlist_id INTEGER REFERENCES rhythmbox_playlist(id),
track_id INTEGER REFERENCES rhythmbox_library(id)
);
Expand Down Expand Up @@ -307,7 +307,7 @@ METADATA
</description>
<sql>
CREATE TABLE IF NOT EXISTS track_analysis (
id INTEGER primary key AUTOINCREMENT,
id INTEGER PRIMARY KEY AUTOINCREMENT,
track_id INTEGER NOT NULL REFERENCES track_locations(id),
type varchar(512),
description varchar(1024),
Expand Down Expand Up @@ -352,7 +352,7 @@ METADATA
Crates in AutoDJ queue (for automated random-track selection).
</description>
<sql>
ALTER TABLE crates ADD COLUMN autodj_source integer DEFAULT 0;
ALTER TABLE crates ADD COLUMN autodj_source INTEGER DEFAULT 0;
</sql>
</revision>
<revision version="21" min_compatible="3">
Expand Down

0 comments on commit db446ad

Please sign in to comment.