Permalink
Browse files

dbhub: Change schema of local database

Also delete the upgrade mechanism that was put in place because it won't
be that easy anyway later on.
  • Loading branch information...
MKleusberg committed Sep 30, 2017
1 parent fef884a commit f18064f0aecb306cde860bde79b10cdfaf6550d2
Showing with 1 addition and 7 deletions.
  1. +1 −7 src/RemoteDatabase.cpp
@@ -518,7 +518,7 @@ void RemoteDatabase::localAssureOpened()
"\"name\" TEXT NOT NULL,"
"\"url\" TEXT NOT NULL,"
"\"commit_id\" TEXT NOT NULL,"
"\"file\" INTEGER,"
"\"file\" TEXT NOT NULL UNIQUE,"
"\"modified\" INTEGER DEFAULT 0,"
"\"branch\" TEXT NOT NULL DEFAULT \"master\""
")");
@@ -530,12 +530,6 @@ void RemoteDatabase::localAssureOpened()
m_dbLocal = nullptr;
return;
}

// Add column "branch" if it doesn't exist yet. This isn't done in a particular nice way here because we just let the
// command fail if it already exists but whatever.
// NOTE that this code can be removed after releasing v3.11.0.
statement = QString("ALTER TABLE \"local\" ADD COLUMN \"branch\" TEXT NOT NULL DEFAULT \"master\"");
sqlite3_exec(m_dbLocal, statement.toUtf8(), NULL, NULL, NULL);
}

void RemoteDatabase::localAdd(QString filename, QString identity, const QUrl& url)

0 comments on commit f18064f

Please sign in to comment.