Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
medialibrary
Commits
cb253ce8
Commit
cb253ce8
authored
Jul 13, 2018
by
Hugo Beauzée-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
migration: Use the media database model file
parent
fc8e82d2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
21 deletions
+2
-21
src/database/migrations/migration13-14.sql
src/database/migrations/migration13-14.sql
+1
-20
src/database/tables/Media_v14.sql
src/database/tables/Media_v14.sql
+1
-1
No files found.
src/database/migrations/migration13-14.sql
View file @
cb253ce8
...
...
@@ -24,26 +24,7 @@
"DROP TABLE "
+
MediaTable
::
Name
,
"CREATE TABLE "
+
MediaTable
::
Name
+
"("
"id_media INTEGER PRIMARY KEY AUTOINCREMENT,"
"type INTEGER,"
"subtype INTEGER NOT NULL DEFAULT "
+
std
::
to_string
(
static_cast
<
typename
std
::
underlying_type
<
IMedia
::
SubType
>
::
type
>
(
IMedia
::
SubType
::
Unknown
)
)
+
","
"duration INTEGER DEFAULT -1,"
"play_count UNSIGNED INTEGER,"
"last_played_date UNSIGNED INTEGER,"
"insertion_date UNSIGNED INTEGER,"
"release_date UNSIGNED INTEGER,"
"thumbnail_id INTEGER,"
"thumbnail_generated BOOLEAN NOT NULL DEFAULT 0,"
"title TEXT COLLATE NOCASE,"
"filename TEXT,"
"is_favorite BOOLEAN NOT NULL DEFAULT 0,"
"is_present BOOLEAN NOT NULL DEFAULT 1,"
"FOREIGN KEY(thumbnail_id) REFERENCES "
+
ThumbnailTable
::
Name
+
"(id_thumbnail)"
")"
,
#
include
"database/tables/Media_v14.sql"
"INSERT INTO "
+
MediaTable
::
Name
+
"("
"id_media, type, subtype, duration, play_count, last_played_date, insertion_date,"
...
...
src/database/tables/Media_v14.sql
View file @
cb253ce8
...
...
@@ -27,4 +27,4 @@
+
policy
::
MediaTable
::
Name
+
"Fts USING FTS3("
"title,"
"labels"
")"
")"
,
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment