Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions v2/sqlite.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ CREATE TABLE root (
if err != nil {
return err
}
hasRow, err = q.Step()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a way you could add a test to check the validity of this and prevent reversions?

if err != nil {
return err
}
if !hasRow {
err = sql.leafWrite.Exec(`
CREATE TABLE latest (key blob, value blob, PRIMARY KEY (key));
Expand Down