-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a mechanism to perform database migrations
- Loading branch information
1 parent
bd3cf4f
commit 094d9fe
Showing
5 changed files
with
361 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "bliss-audio" | ||
version = "0.8.0" | ||
version = "0.9.0" | ||
build = "build.rs" | ||
authors = ["Polochon-street <[email protected]>"] | ||
edition = "2021" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
create table song ( | ||
id integer primary key, | ||
path text not null unique, | ||
duration float, | ||
album_artist text, | ||
artist text, | ||
title text, | ||
album text, | ||
track_number text, | ||
genre text, | ||
cue_path text, | ||
audio_file_path text, | ||
stamp timestamp default current_timestamp, | ||
version integer, | ||
analyzed boolean default false, | ||
extra_info json, | ||
error text | ||
); | ||
create table feature ( | ||
id integer primary key, | ||
song_id integer not null, | ||
feature real not null, | ||
feature_index integer not null, | ||
unique(song_id, feature_index), | ||
foreign key(song_id) references song(id) on delete cascade | ||
); | ||
|
||
insert into song ( | ||
id, path, artist, title, album, album_artist, | ||
track_number, genre, stamp, version, duration, analyzed, | ||
extra_info | ||
) | ||
values ( | ||
1, '/random/path', 'Some Artist', 'A Title', 'Some Album', | ||
'Some Album Artist', '01', 'Electronica', '2022-01-01', | ||
1, 250, true, '{\"key\": \"value\"}' | ||
), | ||
( | ||
2, '/random/path2', 'Some Artist', 'A Title', 'Some Album', | ||
'Some Album Artist', '', 'Electronica', '2022-01-01', | ||
1, 250, true, '{\"key\": \"value\"}' | ||
), | ||
( | ||
3, '/random/path3', 'Some Artist', 'A Title', 'Some Album', | ||
'Some Album Artist', null, 'Electronica', '2022-01-01', | ||
1, 250, true, '{\"key\": \"value\"}' | ||
), | ||
( | ||
4, '/random/path4', 'Some Artist', 'A Title', 'Some Album', | ||
'Some Album Artist', 'test', 'Electronica', '2022-01-01', | ||
1, 250, true, '{\"key\": \"value\"}' | ||
); | ||
|
||
insert into feature (song_id, feature, feature_index) | ||
values | ||
(1, 1.1, 1), | ||
(1, 1.1, 2), | ||
(1, 1.1, 3), | ||
(1, 1.1, 4), | ||
(1, 1.1, 5), | ||
(1, 1.1, 6), | ||
(1, 1.1, 7), | ||
(1, 1.1, 8), | ||
(1, 1.1, 9), | ||
(1, 1.1, 10), | ||
(1, 1.1, 11), | ||
(1, 1.1, 12), | ||
(1, 1.1, 13), | ||
(1, 1.1, 14), | ||
(1, 1.1, 15), | ||
(1, 1.1, 16), | ||
(1, 1.1, 17), | ||
(1, 1.1, 18), | ||
(1, 1.1, 19), | ||
(1, 1.1, 20), | ||
(2, 2.1, 1), | ||
(2, 2.1, 2), | ||
(2, 2.1, 3), | ||
(2, 2.1, 4), | ||
(2, 2.1, 5), | ||
(2, 2.1, 6), | ||
(2, 2.1, 7), | ||
(2, 2.1, 8), | ||
(2, 2.1, 9), | ||
(2, 2.1, 10), | ||
(2, 2.1, 11), | ||
(2, 2.1, 12), | ||
(2, 2.1, 13), | ||
(2, 2.1, 14), | ||
(2, 2.1, 15), | ||
(2, 2.1, 16), | ||
(2, 2.1, 17), | ||
(2, 2.1, 18), | ||
(2, 2.1, 19), | ||
(2, 2.1, 20), | ||
(3, 3.1, 1), | ||
(3, 3.1, 2), | ||
(3, 3.1, 3), | ||
(3, 3.1, 4), | ||
(3, 3.1, 5), | ||
(3, 3.1, 6), | ||
(3, 3.1, 7), | ||
(3, 3.1, 8), | ||
(3, 3.1, 9), | ||
(3, 3.1, 10), | ||
(3, 3.1, 11), | ||
(3, 3.1, 12), | ||
(3, 3.1, 13), | ||
(3, 3.1, 14), | ||
(3, 3.1, 15), | ||
(3, 3.1, 16), | ||
(3, 3.1, 17), | ||
(3, 3.1, 18), | ||
(3, 3.1, 19), | ||
(3, 3.1, 20), | ||
(4, 4.1, 1), | ||
(4, 4.1, 2), | ||
(4, 4.1, 3), | ||
(4, 4.1, 4), | ||
(4, 4.1, 5), | ||
(4, 4.1, 6), | ||
(4, 4.1, 7), | ||
(4, 4.1, 8), | ||
(4, 4.1, 9), | ||
(4, 4.1, 10), | ||
(4, 4.1, 11), | ||
(4, 4.1, 12), | ||
(4, 4.1, 13), | ||
(4, 4.1, 14), | ||
(4, 4.1, 15), | ||
(4, 4.1, 16), | ||
(4, 4.1, 17), | ||
(4, 4.1, 18), | ||
(4, 4.1, 19), | ||
(4, 4.1, 20); |
Oops, something went wrong.