summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--classes/Reply.php23
-rw-r--r--classes/stoica.ini10
-rw-r--r--db/laconica.sql19
3 files changed, 43 insertions, 9 deletions
diff --git a/classes/Reply.php b/classes/Reply.php
new file mode 100644
index 000000000..8b341b1c7
--- /dev/null
+++ b/classes/Reply.php
@@ -0,0 +1,23 @@
+<?php
+/**
+ * Table Definition for reply
+ */
+require_once 'DB/DataObject.php';
+
+class Reply extends DB_DataObject
+{
+ ###START_AUTOCODE
+ /* the code below is auto generated do not remove the above tag */
+
+ public $__table = 'reply'; // table name
+ public $notice_id; // int(4) primary_key not_null
+ public $profile_id; // int(4) primary_key not_null
+ public $replied_id; // int(4)
+ public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
+
+ /* Static get */
+ function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('Reply',$k,$v); }
+
+ /* the code above is auto generated do not remove the tag below */
+ ###END_AUTOCODE
+}
diff --git a/classes/stoica.ini b/classes/stoica.ini
index 67992ea7f..1ceaab80e 100644
--- a/classes/stoica.ini
+++ b/classes/stoica.ini
@@ -105,6 +105,16 @@ modified = 384
id = K
uri = U
+[reply]
+notice_id = 129
+profile_id = 129
+replied_id = 1
+modified = 384
+
+[reply__keys]
+notice_id = K
+profile_id = K
+
[sms_carrier]
id = 129
name = 2
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;