Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 f18064f
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/RemoteDatabase.cpp
Expand Up @@ -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\""
")");
Expand All @@ -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)
Expand Down

0 comments on commit f18064f

Please sign in to comment.