summaryrefslogtreecommitdiff
path: root/db/laconica.sql
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-09-16 14:51:26 -0400
committerEvan Prodromou <evan@prodromou.name>2008-09-16 14:51:26 -0400
commitd57b39e8a5596e91ffae4d583e18934b807b8e43 (patch)
treefe3e31e989930869ba9a898cf814574c929c8209 /db/laconica.sql
parente36deec6b7d2ffcd8fe699d708c775f03a884e0e (diff)
Database and classes for direct messages
darcs-hash:20080916185126-84dde-2983718fc2ab11874c839489290b8a827985274d.gz
Diffstat (limited to 'db/laconica.sql')
-rw-r--r--db/laconica.sql18
1 files changed, 18 insertions, 0 deletions
diff --git a/db/laconica.sql b/db/laconica.sql
index a643fd231..8dba7e379 100644
--- a/db/laconica.sql
+++ b/db/laconica.sql
@@ -311,3 +311,21 @@ create table invitation (
index invitation_address_idx (address, address_type),
index invitation_user_id_idx (user_id)
) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
+
+create table message (
+
+ id integer auto_increment primary key comment 'unique identifier',
+ uri varchar(255) unique key comment 'universally unique identifier',
+ from_profile integer not null comment 'who the message is from' references profile (id),
+ to_profile integer not null comment 'who the message is to' references profile (id),
+ content varchar(140) comment 'message content',
+ rendered text comment 'HTML version of the content',
+ url varchar(255) comment 'URL of any attachment (image, video, bookmark, whatever)',
+ created datetime not null comment 'date this record was created',
+ modified timestamp comment 'date this record was modified',
+ source varchar(32) comment 'source of comment, like "web", "im", or "clientname"',
+
+ index message_from_idx (from_profile),
+ index message_to_idx (to_profile),
+ index message_created_idx (created)
+) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;