minor cleanup

This commit is contained in:
2020-08-31 17:54:49 -05:00
parent 73c67a814d
commit 4f6c77be4f
3 changed files with 38 additions and 119 deletions

View File

@@ -23,12 +23,12 @@ void Database::open() {
file.close();
// if exists, assign it
db = sqlite3pp::database("data.db");
DEBUGLOG(std::cout << "[DB] Database in operation" << std::endl; )
DEBUGLOG(std::cout << "[DB] Database in operation" << std::endl;)
}
else {
// if doesn't, create all the tables
DEBUGLOG(std::cout << "[DB] Creating new database" << std::endl;)
db = sqlite3pp::database("data.db");
db = sqlite3pp::database("data.db");
// creates accounts
db.execute("CREATE TABLE Accounts(AccountID INTEGER PRIMARY KEY AUTOINCREMENT, Login TEXT NOT NULL, Password TEXT NOT NULL);");