change vars

This commit is contained in:
Данил 2022-10-23 15:32:19 +03:00
parent b32429c9c4
commit 9a8f879d7a

View file

@ -12,13 +12,14 @@ func Database() {
Logger(err.Error()) Logger(err.Error())
} }
var exists bool var existsSettings bool
err = db.QueryRow("SELECT EXISTS(SELECT name FROM sqlite_master WHERE type='table' AND name='settings')").Scan(&exists) err = db.QueryRow("SELECT EXISTS(SELECT name FROM sqlite_master WHERE type='table' AND name='settings')").Scan(&existsSettings)
if err != nil { if err != nil {
Logger(err.Error()) Logger(err.Error())
} }
if exists == false { if existsSettings == false {
sqlTable := ` sqlTable := `
CREATE TABLE IF NOT EXISTS settings ( CREATE TABLE IF NOT EXISTS settings (
startup INTEGER DEFAULT 0, startup INTEGER DEFAULT 0,