This commit is contained in:
@@ -3,6 +3,7 @@ package storage
|
||||
import (
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"log"
|
||||
"strings"
|
||||
|
||||
_ "modernc.org/sqlite"
|
||||
@@ -37,7 +38,11 @@ func Open(path string) (*sql.DB, error) {
|
||||
}
|
||||
|
||||
// Migration: add is_active column if it doesn't exist
|
||||
_, _ = db.Exec(AddIsActiveColumn)
|
||||
if _, err := db.Exec(AddIsActiveColumn); err != nil {
|
||||
log.Printf("[sqlite] WARNING: failed to add is_active column: %v", err)
|
||||
} else {
|
||||
log.Println("[sqlite] is_active column migration applied")
|
||||
}
|
||||
|
||||
return db, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user