Fix "already generated" check
This commit is contained in:
parent
07228ac1f4
commit
be356d2298
|
@ -14,7 +14,7 @@ export function generateDB() {
|
|||
return log("Won't generate the database since 'GENERATE_DB' is not set to \"true\" in '.env'!")
|
||||
|
||||
const exists = sqlite.prepare(`SELECT count(*) as a FROM sqlite_master WHERE type='table' AND name='points'`).get()
|
||||
if(!exists.a === 0)
|
||||
if(exists.a === 1)
|
||||
return log("Database already generated!")
|
||||
|
||||
/* Check if columns are already renamed */
|
||||
|
|
Loading…
Reference in New Issue
Block a user