* System stats
* Last callers rewritten using format and VM * Some minor MCI stuff
This commit is contained in:
@@ -17,11 +17,13 @@ function getDatabasePath(name) {
|
||||
}
|
||||
|
||||
function initializeDatabases() {
|
||||
// :TODO: this will need to change if more DB's are added
|
||||
// :TODO: this will need to change if more DB's are added ... why?
|
||||
dbs.user = new sqlite3.Database(getDatabasePath('user'));
|
||||
dbs.message = new sqlite3.Database(getDatabasePath('message'));
|
||||
dbs.system = new sqlite3.Database(getDatabasePath('system'));
|
||||
|
||||
dbs.user.serialize(function serialized() {
|
||||
createSystemTables();
|
||||
createUserTables();
|
||||
createInitialUserValues();
|
||||
});
|
||||
@@ -32,6 +34,15 @@ function initializeDatabases() {
|
||||
});
|
||||
}
|
||||
|
||||
function createSystemTables() {
|
||||
dbs.system.run(
|
||||
'CREATE TABLE IF NOT EXISTS system_property (' +
|
||||
' prop_name VARCHAR PRIMARY KEY NOT NULL,' +
|
||||
' prop_value VARCHAR NOT NULL' +
|
||||
');'
|
||||
);
|
||||
}
|
||||
|
||||
function createUserTables() {
|
||||
dbs.user.run(
|
||||
'CREATE TABLE IF NOT EXISTS user (' +
|
||||
|
||||
Reference in New Issue
Block a user