aboutsummaryrefslogtreecommitdiffstats
path: root/library/ajaxchat/chat/chat.sql
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-01-18 23:49:39 -0800
committerfriendica <info@friendica.com>2014-01-18 23:49:39 -0800
commit724ad4505628d493b43b4f585512d67dc0b4ee76 (patch)
tree4fb920a79e3dff961a6301ec56ec9f40e91f6af3 /library/ajaxchat/chat/chat.sql
parent3f7032e542e3c451507fc9266ab3536155c8190f (diff)
downloadvolse-hubzilla-724ad4505628d493b43b4f585512d67dc0b4ee76.tar.gz
volse-hubzilla-724ad4505628d493b43b4f585512d67dc0b4ee76.tar.bz2
volse-hubzilla-724ad4505628d493b43b4f585512d67dc0b4ee76.zip
add ajaxchat library - needs a lot of integration work to handle decentralisation (e.g. chatroom@website) and zotid w/permissions (e.g. ACL controlled chatrooms); we can also rip out a lot of stuff we don't need.
Diffstat (limited to 'library/ajaxchat/chat/chat.sql')
-rw-r--r--library/ajaxchat/chat/chat.sql47
1 files changed, 47 insertions, 0 deletions
diff --git a/library/ajaxchat/chat/chat.sql b/library/ajaxchat/chat/chat.sql
new file mode 100644
index 000000000..5e7efea35
--- /dev/null
+++ b/library/ajaxchat/chat/chat.sql
@@ -0,0 +1,47 @@
+
+DROP TABLE IF EXISTS ajax_chat_online;
+CREATE TABLE ajax_chat_online (
+ userID INT(11) NOT NULL,
+ userName VARCHAR(64) NOT NULL,
+ userRole INT(1) NOT NULL,
+ channel INT(11) NOT NULL,
+ dateTime DATETIME NOT NULL,
+ ip VARBINARY(16) NOT NULL,
+ PRIMARY KEY (userID),
+ INDEX (userName)
+) DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
+
+DROP TABLE IF EXISTS ajax_chat_messages;
+CREATE TABLE ajax_chat_messages (
+ id INT(11) NOT NULL AUTO_INCREMENT,
+ userID INT(11) NOT NULL,
+ userName VARCHAR(64) NOT NULL,
+ userRole INT(1) NOT NULL,
+ channel INT(11) NOT NULL,
+ dateTime DATETIME NOT NULL,
+ ip VARBINARY(16) NOT NULL,
+ text TEXT,
+ PRIMARY KEY (id),
+ INDEX message_condition (id, channel, dateTime),
+ INDEX (dateTime)
+) DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
+
+DROP TABLE IF EXISTS ajax_chat_bans;
+CREATE TABLE ajax_chat_bans (
+ userID INT(11) NOT NULL,
+ userName VARCHAR(64) NOT NULL,
+ dateTime DATETIME NOT NULL,
+ ip VARBINARY(16) NOT NULL,
+ PRIMARY KEY (userID),
+ INDEX (userName),
+ INDEX (dateTime)
+) DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
+
+DROP TABLE IF EXISTS ajax_chat_invitations;
+CREATE TABLE ajax_chat_invitations (
+ userID INT(11) NOT NULL,
+ channel INT(11) NOT NULL,
+ dateTime DATETIME NOT NULL,
+ PRIMARY KEY (userID, channel),
+ INDEX (dateTime)
+) DEFAULT CHARSET=utf8 COLLATE=utf8_bin;