Commit d0640747 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Do not create an index manually.

Sqlite already does this for UNIQUE columns
parent 5bbaa412
......@@ -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() );
}
......
......@@ -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
......
......@@ -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("
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment