narrow scope of db exists check
diff --git a/init.go b/init.go index a8dd899..5c243ce 100644 --- a/init.go +++ b/init.go
@@ -33,7 +33,7 @@ } var count int - row := db.QueryRow("SELECT count(*) FROM sqlite_master WHERE type='table';") + row := db.QueryRow("SELECT count(*) FROM sqlite_master WHERE type='table' AND name='company';") if err := row.Scan(&count); err != nil { log.Panic("Unable to setup database", err) }