make id unique again

This commit is contained in:
Tobias Fella 2020-03-19 00:04:55 +01:00
parent 7013a7278e
commit 552ad82816
No known key found for this signature in database
GPG Key ID: E55EDAB3CA5D9925

View File

@ -51,7 +51,7 @@ bool Database::migrate() {
bool Database::migrateTo1() {
QSqlQuery query(QSqlDatabase::database());
TRUE_OR_RETURN(execute(QStringLiteral("CREATE TABLE IF NOT EXISTS Feeds (name TEXT, url TEXT);")));
TRUE_OR_RETURN(execute(QStringLiteral("CREATE TABLE IF NOT EXISTS Entries (feed TEXT, id TEXT, title TEXT, content TEXT);")));
TRUE_OR_RETURN(execute(QStringLiteral("CREATE TABLE IF NOT EXISTS Entries (feed TEXT, id TEXT UNIQUE, title TEXT, content TEXT);")));
TRUE_OR_RETURN(execute(QStringLiteral("CREATE TABLE IF NOT EXISTS Authors (id TEXT, name TEXT, uri TEXT, email TEXT);")));
TRUE_OR_RETURN(execute(QStringLiteral("PRAGMA user_version = 1;")));
return true;