Skip to content

Commit f18064f

Browse files
committed
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.
1 parent fef884a commit f18064f

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/RemoteDatabase.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ void RemoteDatabase::localAssureOpened()
518518
"\"name\" TEXT NOT NULL,"
519519
"\"url\" TEXT NOT NULL,"
520520
"\"commit_id\" TEXT NOT NULL,"
521-
"\"file\" INTEGER,"
521+
"\"file\" TEXT NOT NULL UNIQUE,"
522522
"\"modified\" INTEGER DEFAULT 0,"
523523
"\"branch\" TEXT NOT NULL DEFAULT \"master\""
524524
")");
@@ -530,12 +530,6 @@ void RemoteDatabase::localAssureOpened()
530530
m_dbLocal = nullptr;
531531
return;
532532
}
533-
534-
// Add column "branch" if it doesn't exist yet. This isn't done in a particular nice way here because we just let the
535-
// command fail if it already exists but whatever.
536-
// NOTE that this code can be removed after releasing v3.11.0.
537-
statement = QString("ALTER TABLE \"local\" ADD COLUMN \"branch\" TEXT NOT NULL DEFAULT \"master\"");
538-
sqlite3_exec(m_dbLocal, statement.toUtf8(), NULL, NULL, NULL);
539533
}
540534

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

0 commit comments

Comments
 (0)