diff options
author | Evan Prodromou <evan@prodromou.name> | 2008-11-20 15:55:06 -0500 |
---|---|---|
committer | Evan Prodromou <evan@prodromou.name> | 2008-11-20 15:55:06 -0500 |
commit | 8a0c438aedebaa0282e4f23c83dbe0d7d2635f33 (patch) | |
tree | 9d3c870e22f732b2e69bdf28733570dff978de72 | |
parent | 3b4db8f5e1b10c6b8bd09916490843bfd1d7455c (diff) |
add profile tags to DB
darcs-hash:20081120205506-84dde-e9aa0a70d3529f91909dbe29f03a46b40ef18fff.gz
-rw-r--r-- | classes/Profile_tag.php | 23 | ||||
-rw-r--r-- | classes/laconica.ini | 16 | ||||
-rw-r--r-- | db/laconica.sql | 12 |
3 files changed, 49 insertions, 2 deletions
diff --git a/classes/Profile_tag.php b/classes/Profile_tag.php new file mode 100644 index 000000000..f2d6ec6cf --- /dev/null +++ b/classes/Profile_tag.php @@ -0,0 +1,23 @@ +<?php +/** + * Table Definition for profile_tag + */ +require_once 'classes/Memcached_DataObject'; + +class Profile_tag extends Memcached_DataObject +{ + ###START_AUTOCODE + /* the code below is auto generated do not remove the above tag */ + + public $__table = 'profile_tag'; // table name + public $tagger; // int(4) primary_key not_null + public $tagged; // int(4) primary_key not_null + public $tag; // varchar(64) primary_key not_null + public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP + + /* Static get */ + function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('Profile_tag',$k,$v); } + + /* the code above is auto generated do not remove the tag below */ + ###END_AUTOCODE +} diff --git a/classes/laconica.ini b/classes/laconica.ini index 466707735..470c0eaf1 100644 --- a/classes/laconica.ini +++ b/classes/laconica.ini @@ -157,6 +157,7 @@ user_id = 129 notice_id = 129 source = 17 created = 142 +source = 17 [notice_inbox__keys] user_id = K @@ -195,6 +196,17 @@ modified = 384 [profile__keys] id = N +[profile_tag] +tagger = 129 +tagged = 129 +tag = 130 +modified = 384 + +[profile_tag__keys] +tagger = K +tagged = K +tag = K + [queue_item] notice_id = 129 transport = 130 @@ -296,10 +308,10 @@ smsreplies = 17 smsemail = 2 uri = 2 autosubscribe = 17 +urlshorteningservice = 2 +inboxed = 17 created = 142 modified = 384 -inboxed = 17 -urlshorteningservice = 2 [user__keys] id = K diff --git a/db/laconica.sql b/db/laconica.sql index 4f4c37bd6..3417ef254 100644 --- a/db/laconica.sql +++ b/db/laconica.sql @@ -345,3 +345,15 @@ create table notice_inbox ( constraint primary key (user_id, notice_id), index notice_inbox_notice_id_idx (notice_id) ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin; + +create table profile_tag ( + tagger integer not null comment 'user making the tag' references user (id), + tagged integer not null comment 'profile tagged' references profile (id), + tag varchar(64) not null comment 'hash tag associated with this notice', + modified timestamp comment 'date the tag was added', + + constraint primary key (tagger, tagged, tag), + index profile_tag_modified_idx (modified), + index profile_tag_tagger_tag_idx (tagger, tag) +) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin; + |