summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-07-06 18:38:39 -0400
committerEvan Prodromou <evan@prodromou.name>2008-07-06 18:38:39 -0400
commit7231c58e22c0839b692bea6dd6f39d6a9dcdb823 (patch)
tree2c0a489f214d6de49b80228fda2f37055ec40506 /db
parentab3e1556baf5b384272323b03643bad6aa0ddc1b (diff)
some twiddles in the db for replies, plus the class
darcs-hash:20080706223839-84dde-269eba758843e45265a08379356cdfd84701e2cd.gz
Diffstat (limited to 'db')
-rw-r--r--db/laconica.sql19
1 files changed, 10 insertions, 9 deletions
diff --git a/db/laconica.sql b/db/laconica.sql
index af94e3b61..a7fbc0c21 100644
--- a/db/laconica.sql
+++ b/db/laconica.sql
@@ -93,15 +93,16 @@ create table notice (
) ENGINE=InnoDB;
create table reply (
- id integer auto_increment primary key comment 'unique identifier',
- notice_id integer comment 'foreign key to notice table',
- user_id integer comment 'foreign key to user table',
- replied_id integer comment 'foreign key to notice table',
- created datetime not null comment 'date this reply was created',
-
- index notice_id_idx (notice_id),
- index user_id_idx (user_id),
- index replied_id_idx (replied_id)
+
+ notice_id integer not null comment 'notice that is the reply' references notice (id),
+ profile_id integer not null comment 'profile replied to' references profile (id),
+ replied_id integer comment 'notice replied to (a guess)' references notice (id),
+ modified timestamp not null comment 'date this record was modified',
+
+ constraint primary key (notice_id, profile_id),
+ index reply_notice_id_idx (notice_id),
+ index reply_profile_id_idx (profile_id),
+ index reply_replied_id_idx (replied_id)
) ENGINE=InnoDB;