Skip to content

Commit

Permalink
Remove unneeded alter table transactions from sqlite (go-shiori#372)
Browse files Browse the repository at this point in the history
  • Loading branch information
n8225 authored Feb 14, 2022
1 parent 0bd297d commit 2b4fd9f
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions internal/database/sqlite.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,6 @@ func OpenSQLiteDatabase(databasePath string) (sqliteDB *SQLiteDatabase, err erro
tx.MustExec(`CREATE VIRTUAL TABLE IF NOT EXISTS bookmark_content
USING fts5(title, content, html, docid)`)

// Alter table if needed
if _, err := tx.Exec(`ALTER TABLE account ADD COLUMN owner INTEGER NOT NULL DEFAULT 0`); err != nil {
log.Printf("error during database alert: %s", err)
}
if _, err := tx.Exec(`ALTER TABLE bookmark ADD COLUMN public INTEGER NOT NULL DEFAULT 0`); err != nil {
log.Printf("error during database alert: %s", err)
}

err = tx.Commit()
checkError(err)

Expand Down

0 comments on commit 2b4fd9f

Please sign in to comment.