summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2008-12-03 17:26:19 -0500
committerEvan Prodromou <evan@controlyourself.ca>2008-12-03 17:26:19 -0500
commitcb93e214f83738e88fd5f1aafc0d82384d2820ed (patch)
tree9679ece6a4e70c01572204fa03f02feedfec831b
parent2670324ca8d868be1c46c54a3af7f3c1ebda31d0 (diff)
add profile block data object
darcs-hash:20081203222619-5ed1f-b313092893c67a3ec1dc92a79aa7fed4ab583729.gz
-rw-r--r--classes/Profile_block.php22
-rw-r--r--classes/laconica.ini9
-rw-r--r--db/laconica.sql9
3 files changed, 40 insertions, 0 deletions
diff --git a/classes/Profile_block.php b/classes/Profile_block.php
new file mode 100644
index 000000000..f80670176
--- /dev/null
+++ b/classes/Profile_block.php
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Table Definition for profile_block
+ */
+require_once 'classes/Memcached_DataObject';
+
+class Profile_block extends Memcached_DataObject
+{
+ ###START_AUTOCODE
+ /* the code below is auto generated do not remove the above tag */
+
+ public $__table = 'profile_block'; // table name
+ public $blocker; // int(4) primary_key not_null
+ public $blocked; // int(4) primary_key not_null
+ public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
+
+ /* Static get */
+ function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('Profile_block',$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 ccf7e2f87..4f5f9c2e4 100644
--- a/classes/laconica.ini
+++ b/classes/laconica.ini
@@ -195,6 +195,15 @@ modified = 384
[profile__keys]
id = N
+[profile_block]
+blocker = 129
+blocked = 129
+modified = 384
+
+[profile_block__keys]
+blocker = K
+blocked = K
+
[profile_tag]
tagger = 129
tagged = 129
diff --git a/db/laconica.sql b/db/laconica.sql
index 3417ef254..50a61c7d9 100644
--- a/db/laconica.sql
+++ b/db/laconica.sql
@@ -357,3 +357,12 @@ create table profile_tag (
index profile_tag_tagger_tag_idx (tagger, tag)
) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
+create table profile_block (
+
+ blocker integer not null comment 'user making the block' references user (id),
+ blocked integer not null comment 'profile that is blocked' references profile (id),
+ modified timestamp comment 'date of blocking',
+
+ constraint primary key (blocker, blocked)
+
+) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;