Merge branch 'master' of ssh://numinibsd/git/base/enigma-bbs

This commit is contained in:
Bryan Ashby 2016-01-03 15:53:35 -07:00
commit 79b84ac0f3
1 changed files with 19 additions and 3 deletions

View File

@ -61,17 +61,33 @@ function initializeDatabases(cb) {
});
}
],
cb
function complete(err) {
cb(err);
}
);
}
function createSystemTables() {
dbs.system.run(
'CREATE TABLE IF NOT EXISTS system_property (' +
'CREATE TABLE IF NOT EXISTS system_property (' +
' prop_name VARCHAR PRIMARY KEY NOT NULL,' +
' prop_value VARCHAR NOT NULL' +
');'
);
//
// system_log can round log_timestamp for daily, monthly, etc.
// statistics as well as unique entries.
//
/*
dbs.system.run(
'CREATE TABLE IF NOT EXISTS system_log (' +
' log_timestamp DATETIME PRIMARY KEY NOT NULL ( ' +
' log_name VARCHARNOT NULL,' +
' log_value VARCHAR NOT NULL,' +
' UNIQUE(log_timestamp, log_name)' +
');'
);*/
}
function createUserTables() {
@ -123,7 +139,7 @@ function createMessageBaseTables() {
' from_user_name VARCHAR NOT NULL,' +
' subject,' + // FTS @ message_fts
' message,' + // FTS @ message_fts
' modified_timestamp DATETIME NOT NULL,' +
' modified_timestamp DATETIME NOT NULL,' +
' view_count INTEGER NOT NULL DEFAULT 0,' +
' UNIQUE(message_uuid)' +
');'