diff --git a/internal/database/sqlite.go b/internal/database/sqlite.go index bb7c13e..78fcad8 100644 --- a/internal/database/sqlite.go +++ b/internal/database/sqlite.go @@ -73,6 +73,9 @@ func OpenSQLiteDatabase(databasePath string) (sqliteDB *SQLiteDatabase, err erro tx.MustExec(`CREATE VIRTUAL TABLE IF NOT EXISTS bookmark_content USING fts4(title, content, html)`) + // Alter table if needed + tx.Exec(`ALTER TABLE account ADD COLUMN owner INTEGER NOT NULL DEFAULT 0`) + err = tx.Commit() checkError(err) diff --git a/internal/model/model.go b/internal/model/model.go index 889e397..96f214f 100644 --- a/internal/model/model.go +++ b/internal/model/model.go @@ -19,9 +19,9 @@ type Bookmark struct { Modified string `db:"modified" json:"modified"` Content string `db:"content" json:"-"` HTML string `db:"html" json:"html,omitempty"` + ImageURL string `db:"image_url" json:"imageURL"` HasContent bool `db:"has_content" json:"hasContent"` HasArchive bool `json:"hasArchive"` - ImageURL string `json:"imageURL"` Tags []Tag `json:"tags"` CreateArchive bool `json:"createArchive"` }