Some of breadthread is working, added basic role tracking
This commit is contained in:
@@ -15,7 +15,7 @@ export class SqliteDB implements SQLCommon {
|
||||
if (err) {
|
||||
// TODO Winston should handle this
|
||||
console.log(err)
|
||||
throw err
|
||||
reject(err)
|
||||
} else {
|
||||
resolve(this.changes)
|
||||
}
|
||||
@@ -29,7 +29,7 @@ export class SqliteDB implements SQLCommon {
|
||||
if (err) {
|
||||
// TODO Winston should handle this
|
||||
console.log(err)
|
||||
throw err
|
||||
reject(err)
|
||||
} else {
|
||||
resolve(this.changes)
|
||||
}
|
||||
@@ -43,9 +43,8 @@ export class SqliteDB implements SQLCommon {
|
||||
if (err) {
|
||||
// TODO Winston should handle this
|
||||
console.log(err)
|
||||
throw err
|
||||
reject(err)
|
||||
} else {
|
||||
console.log("Got rows")
|
||||
resolve(rows)
|
||||
}
|
||||
})
|
||||
@@ -58,7 +57,7 @@ export class SqliteDB implements SQLCommon {
|
||||
if (err) {
|
||||
// TODO Winston should handle this
|
||||
console.log(err)
|
||||
throw err
|
||||
reject(err)
|
||||
} else {
|
||||
resolve(rows)
|
||||
}
|
||||
|
||||
@@ -6,7 +6,9 @@ const tables: string[] = [
|
||||
"CREATE TABLE IF NOT EXISTS users (user_snowflake bigint NOT NULL PRIMARY KEY,user_name text NOT NULL,user_displayname text);",
|
||||
"CREATE TABLE IF NOT EXISTS messages (message_snowflake bigint NOT NULL PRIMARY KEY,channel_snowflake bigint NOT NULL,user_snowflake bigint NOT NULL,message_content longtext NOT NULL,message_timestamp datetime NOT NULL,message_deleted bit NOT NULL);",
|
||||
"CREATE TABLE IF NOT EXISTS message_content_changes (message_change_id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,message_snowflake bigint NOT NULL,message_change_old_timestamp datetime NOT NULL,message_change_old_content longtext NOT NULL);",
|
||||
"CREATE TABLE IF NOT EXISTS message_attachments (attachment_snowflake bigint NOT NULL PRIMARY KEY,message_snowflake bigint NOT NULL,attachment_name text NOT NULL,attachment_description text,attachment_timestamp datetime NOT NULL,attachment_mime_type text,attachment_url text NOT NULL,attachment_downloaded bit NOT NULL);"
|
||||
"CREATE TABLE IF NOT EXISTS message_attachments (attachment_snowflake bigint NOT NULL PRIMARY KEY,message_snowflake bigint NOT NULL,attachment_name text NOT NULL,attachment_description text,attachment_timestamp datetime NOT NULL,attachment_mime_type text,attachment_url text NOT NULL,attachment_downloaded bit NOT NULL);",
|
||||
"CREATE TABLE IF NOT EXISTS breadthread_autolock (breadthread_autolock_id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,channel_snowflake bigint NOT NULL,inactivity_seconds bigint NOT NULL,locked bit NOT NULL);",
|
||||
"CREATE TABLE IF NOT EXISTS roles (role_snowflake bigint NOT NULL PRIMARY KEY,server_snowflake bigint NOT NULL,role_name text NOT NULL,is_deleted bit NOT NULL);"
|
||||
]
|
||||
|
||||
const constraints: string[] = [
|
||||
|
||||
Reference in New Issue
Block a user