Remove commented line of code in database

This commit is contained in:
Marco Realacci 2022-12-22 17:24:44 +01:00
parent 0402e2fd84
commit 13b2cc066e

View file

@ -100,7 +100,6 @@ func New(db *sql.DB) (AppDatabase, error) {
//todo: check for all the tables, not just users //todo: check for all the tables, not just users
err := db.QueryRow(`SELECT name FROM sqlite_master WHERE type='table' AND name='users';`).Scan(&tableName) err := db.QueryRow(`SELECT name FROM sqlite_master WHERE type='table' AND name='users';`).Scan(&tableName)
if errors.Is(err, sql.ErrNoRows) { if errors.Is(err, sql.ErrNoRows) {
//fmt.Println("database is empty, creating structure")
sqlStmt := `CREATE TABLE "users" ( sqlStmt := `CREATE TABLE "users" (
"uid" TEXT NOT NULL, "uid" TEXT NOT NULL,
"name" TEXT NOT NULL UNIQUE, "name" TEXT NOT NULL UNIQUE,