Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
medialibrary
Commits
d0640747
Commit
d0640747
authored
May 20, 2014
by
Hugo Beauzée-Luyssen
Browse files
Do not create an index manually.
Sqlite already does this for UNIQUE columns
parent
5bbaa412
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/File.cpp
View file @
d0640747
...
...
@@ -109,9 +109,6 @@ bool File::createTable(sqlite3* connection)
"show_episode_id UNSIGNED INTEGER,"
"mrl TEXT UNIQUE ON CONFLICT FAIL"
")"
;
if
(
SqliteTools
::
executeRequest
(
connection
,
req
.
c_str
()
)
==
false
)
return
false
;
req
=
"CREATE INDEX file_index ON "
+
policy
::
FileTable
::
Name
+
" (mrl)"
;
return
SqliteTools
::
executeRequest
(
connection
,
req
.
c_str
()
);
}
...
...
src/File.h
View file @
d0640747
...
...
@@ -31,8 +31,6 @@ struct FileCache
class
File
:
public
IFile
,
public
Cache
<
File
,
IFile
,
policy
::
FileTable
,
policy
::
FileCache
>
{
public:
enum
Type
{
VideoType
,
// Any video file, not being a tv show episode
...
...
src/Label.cpp
View file @
d0640747
...
...
@@ -67,10 +67,6 @@ bool Label::createTable(sqlite3* dbConnection)
"id_label INTEGER PRIMARY KEY AUTOINCREMENT, "
"name TEXT UNIQUE ON CONFLICT FAIL"
")"
;
if
(
SqliteTools
::
executeRequest
(
dbConnection
,
req
.
c_str
()
)
==
false
)
return
false
;
//FIXME: Check for a better way when addressing transactions
req
=
"CREATE INDEX label_index ON "
+
policy
::
LabelTable
::
Name
+
" (name)"
;
if
(
SqliteTools
::
executeRequest
(
dbConnection
,
req
.
c_str
()
)
==
false
)
return
false
;
req
=
"CREATE TABLE IF NOT EXISTS LabelFileRelation("
...
...
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