mirror of
https://github.com/Starlio-app/StarlioX
synced 2024-11-22 08:46:22 +03:00
change vars
This commit is contained in:
parent
b32429c9c4
commit
9a8f879d7a
1 changed files with 4 additions and 3 deletions
|
@ -12,13 +12,14 @@ func Database() {
|
|||
Logger(err.Error())
|
||||
}
|
||||
|
||||
var exists bool
|
||||
err = db.QueryRow("SELECT EXISTS(SELECT name FROM sqlite_master WHERE type='table' AND name='settings')").Scan(&exists)
|
||||
var existsSettings bool
|
||||
err = db.QueryRow("SELECT EXISTS(SELECT name FROM sqlite_master WHERE type='table' AND name='settings')").Scan(&existsSettings)
|
||||
|
||||
if err != nil {
|
||||
Logger(err.Error())
|
||||
}
|
||||
|
||||
if exists == false {
|
||||
if existsSettings == false {
|
||||
sqlTable := `
|
||||
CREATE TABLE IF NOT EXISTS settings (
|
||||
startup INTEGER DEFAULT 0,
|
||||
|
|
Loading…
Add table
Reference in a new issue