|
@ -7,6 +7,7 @@ |
|
|
namespace db { |
|
|
namespace db { |
|
|
sql::Database* init(std::string name) { |
|
|
sql::Database* init(std::string name) { |
|
|
sql::Database* db = new sql::Database(name, SQLite::OPEN_READWRITE|SQLite::OPEN_CREATE); |
|
|
sql::Database* db = new sql::Database(name, SQLite::OPEN_READWRITE|SQLite::OPEN_CREATE); |
|
|
|
|
|
db->exec("PRAGMA foreign_keys = ON;"); |
|
|
DEBUG << "SQLite database file '" << db->getFilename().c_str() << "' opened successfully\n"; |
|
|
DEBUG << "SQLite database file '" << db->getFilename().c_str() << "' opened successfully\n"; |
|
|
|
|
|
|
|
|
Schema* schema = new Schema(db); |
|
|
Schema* schema = new Schema(db); |
|
|