diff options
author | Evan Prodromou <evan@status.net> | 2010-08-10 23:36:13 -0700 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-08-10 23:36:13 -0700 |
commit | 41dfea163460bb216483e8e12fff7a8afefbb4fb (patch) | |
tree | 8049f397c1a39b1a49a7a0d3d6eac707f5f13e14 /db | |
parent | 3062cc270607ad60993e5e6d6e3977fab74508b0 (diff) | |
parent | 5c210f724a865830d0c39feba8386f495b18ee4f (diff) |
Merge branch 'master' of gitorious.org:statusnet/mainline
Diffstat (limited to 'db')
-rw-r--r-- | db/site.sql | 14 | ||||
-rw-r--r-- | db/site_093to094.sql | 13 |
2 files changed, 25 insertions, 2 deletions
diff --git a/db/site.sql b/db/site.sql index 791303bd5..f87995b94 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', @@ -21,3 +22,12 @@ create table status_network ( 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; + diff --git a/db/site_093to094.sql b/db/site_093to094.sql new file mode 100644 index 000000000..30cea31df --- /dev/null +++ b/db/site_093to094.sql @@ -0,0 +1,13 @@ +alter table status_network + drop primary key, + add column site_id integer auto_increment primary key first, + add unique key (nickname); + +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; + |