mirror of
https://github.com/Starlio-app/Starlio-web.git
synced 2024-11-22 00:36:20 +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())
|
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,
|
||||||
|
|
Loading…
Add table
Reference in a new issue