From 7065450f03078fb1ac2105b75f9c7a4e052bca9c Mon Sep 17 00:00:00 2001
From: James Walker <walkah@walkah.net>
Date: Tue, 20 Jul 2010 17:34:58 -0700
Subject: normalizing tags for status_network

---
 db/site.sql | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

(limited to 'db/site.sql')

diff --git a/db/site.sql b/db/site.sql
index 791303bd5..bc425841d 100644
--- a/db/site.sql
+++ b/db/site.sql
@@ -1,8 +1,9 @@
 /* For managing multiple sites */
 
 create table status_network (
-
-    nickname varchar(64) primary key comment 'nickname',
+       
+    site_id  integer auto_increment primary key comment 'unique id',
+    nickname varchar(64)  unique key comment 'nickname',
     hostname varchar(255) unique key comment 'alternate hostname if any',
     pathname varchar(255) unique key comment 'alternate pathname if any',
 
@@ -15,9 +16,16 @@ create table status_network (
     theme varchar(255) comment 'theme name',
     logo varchar(255) comment 'site logo',
     
-    tags text comment 'site meta-info tags (pipe-separated)',
-
     created datetime not null comment 'date this record was created',
     modified timestamp comment 'date this record was modified'
 
 ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;
+
+create table status_network_tag (
+    site_id integer  comment 'unique id',
+    tag varchar(64) comment 'tag name',
+    created datetime not null comment 'date the record was created',
+
+    constraint primary key (site_id, tag)
+) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;
+
-- 
cgit v1.2.3-54-g00ecf


From a6b1feb08cbd3f7bd3f83a31c449b5a4ca8965f0 Mon Sep 17 00:00:00 2001
From: James Walker <walkah@walkah.net>
Date: Wed, 28 Jul 2010 11:43:47 -0400
Subject: leaving tags column in (for now)

---
 db/site.sql | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'db/site.sql')

diff --git a/db/site.sql b/db/site.sql
index bc425841d..f87995b94 100644
--- a/db/site.sql
+++ b/db/site.sql
@@ -16,6 +16,8 @@ create table status_network (
     theme varchar(255) comment 'theme name',
     logo varchar(255) comment 'site logo',
     
+    tags text comment 'site meta-info tags (pipe-separated)',
+
     created datetime not null comment 'date this record was created',
     modified timestamp comment 'date this record was modified'
 
-- 
cgit v1.2.3-54-g00ecf

