summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/08to09_pg.sql19
-rw-r--r--db/notice_source.sql3
-rw-r--r--db/site.sql14
-rw-r--r--db/site_093to094.sql13
-rw-r--r--db/statusnet_pg.sql2
5 files changed, 48 insertions, 3 deletions
diff --git a/db/08to09_pg.sql b/db/08to09_pg.sql
index c2fabf63b..d3eb64443 100644
--- a/db/08to09_pg.sql
+++ b/db/08to09_pg.sql
@@ -100,6 +100,25 @@ insert into queue_item_new (frame,transport,created,claimed)
alter table queue_item rename to queue_item_old;
alter table queue_item_new rename to queue_item;
+ALTER TABLE confirm_address ALTER column sent set default CURRENT_TIMESTAMP;
+
+create table user_location_prefs (
+ user_id integer not null /*comment 'user who has the preference'*/ references "user" (id),
+ share_location int default 1 /* comment 'Whether to share location data'*/,
+ created timestamp not null /*comment 'date this record was created'*/,
+ modified timestamp /* comment 'date this record was modified'*/,
+
+ primary key (user_id)
+);
+
+create table inbox (
+
+ user_id integer not null /* comment 'user receiving the notice' */ references "user" (id),
+ notice_ids bytea /* comment 'packed list of notice ids' */,
+
+ primary key (user_id)
+
+);
create table user_location_prefs (
user_id integer not null /*comment 'user who has the preference'*/ references "user" (id),
diff --git a/db/notice_source.sql b/db/notice_source.sql
index fbcdd6568..6bfd5c5f1 100644
--- a/db/notice_source.sql
+++ b/db/notice_source.sql
@@ -9,6 +9,7 @@ VALUES
('bti','bti','http://gregkh.github.com/bti/', now()),
('choqok', 'Choqok', 'http://choqok.gnufolks.org/', now()),
('cliqset', 'Cliqset', 'http://www.cliqset.com/', now()),
+ ('DarterosStatus', 'Darteros Status', 'http://www.darteros.com/doc/Darteros_Status', now()),
('deskbar','Deskbar-Applet','http://www.gnome.org/projects/deskbar-applet/', now()),
('Do','Gnome Do','http://do.davebsd.com/wiki/index.php?title=Microblog_Plugin', now()),
('drupal','Drupal','http://drupal.org/', now()),
@@ -17,6 +18,7 @@ VALUES
('Facebook','Facebook','http://apps.facebook.com/identica/', now()),
('feed2omb','feed2omb','http://projects.ciarang.com/p/feed2omb/', now()),
('get2gnow', 'get2gnow', 'http://uberchicgeekchick.com/?projects=get2gnow', now()),
+ ('gNewBook', 'gNewBook', 'http://www.gnewbook.org/', now()),
('gravity', 'Gravity', 'http://mobileways.de/gravity', now()),
('Gwibber','Gwibber','http://launchpad.net/gwibber', now()),
('HelloTxt','HelloTxt','http://hellotxt.com/', now()),
@@ -49,6 +51,7 @@ VALUES
('smob','SMOB','http://smob.sioc-project.org/', now()),
('socialoomphBfD4pMqz31', 'SocialOomph', 'http://www.socialoomph.com/', now()),
('spaz','Spaz','http://funkatron.com/spaz', now()),
+ ('StatusNet Desktop', 'StatusNet Desktop', 'http://status.net/desktop', now()),
('tarpipe','tarpipe','http://tarpipe.com/', now()),
('tjunar','Tjunar','http://nederflash.nl/boek/titels/tjunar-air', now()),
('tr.im','tr.im','http://tr.im/', now()),
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;
+
diff --git a/db/statusnet_pg.sql b/db/statusnet_pg.sql
index 3f62ab752..2db98550c 100644
--- a/db/statusnet_pg.sql
+++ b/db/statusnet_pg.sql
@@ -276,7 +276,7 @@ create table confirm_address (
address_extra varchar(255) not null default '' /* comment 'carrier ID, for SMS' */,
address_type varchar(8) not null /* comment 'address type ("email", "jabber", "sms")' */,
claimed timestamp /* comment 'date this was claimed for queueing' */,
- sent timestamp /* comment 'date this was sent for queueing' */,
+ sent timestamp default CURRENT_TIMESTAMP /* comment 'date this was sent for queueing' */,
modified timestamp /* comment 'date this record was modified' */
);