From e62dfc6f8aa4b215682311bca427142b2fe30a88 Mon Sep 17 00:00:00 2001
From: friendica <info@friendica.com>
Date: Thu, 19 Sep 2013 22:27:12 -0700
Subject: add a flag field to xtags so that we can filter tags based on whether
 or not the parent xchan is safe or not. Otherwise we'll have tags that lead
 to nowhere because the directory entry is hidden but the tag isn't. A
 successful porn site in the matrix could also swamp the directory with
 x-rated tags, even if the site was playing nice and did everything right to
 self-censor. Accomplishing this with joins would be horrendously inefficient,
 though it will take a bit of code re-org to get this flag where it needs to
 be when it's time to set keywords.

---
 install/database.sql | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'install/database.sql')

diff --git a/install/database.sql b/install/database.sql
index a74b30d59..44e211630 100644
--- a/install/database.sql
+++ b/install/database.sql
@@ -1025,7 +1025,9 @@ CREATE TABLE IF NOT EXISTS `xtag` (
   `xtag_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
   `xtag_hash` char(255) NOT NULL,
   `xtag_term` char(255) NOT NULL DEFAULT '',
+  `xtag_flags` int(11) NOT NULL DEFAULT '0',
   PRIMARY KEY (`xtag_id`),
   KEY `xtag_term` (`xtag_term`),
-  KEY `xtag_hash` (`xtag_hash`)
+  KEY `xtag_hash` (`xtag_hash`),
+  KEY `xtag_flags` (`xtag_flags`)
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- 
cgit v1.2.3

