summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-06-10 15:37:06 -0700
committerBrion Vibber <brion@pobox.com>2010-06-10 15:37:06 -0700
commitb1a68e15b760aa2e588680c9e8c7526a7a6d1d13 (patch)
tree6100f1aa00f9930433f178173099c0ce67fdc502 /db
parent7cc58b97feb822ab999b7fefa3a50ce53a7838d5 (diff)
parente121d472e7dbb914a85b10bde0a9e2add4d19d11 (diff)
Merge branch '0.9.x' of gitorious.org:statusnet/mainline into 1.0.x
Conflicts: lib/default.php lib/util.php plugins/UrlShortener/UrlShortenerPlugin.php (has been removed?)
Diffstat (limited to 'db')
-rw-r--r--db/08to09_pg.sql39
-rw-r--r--db/notice_source.sql1
-rw-r--r--db/statusnet_pg.sql20
3 files changed, 51 insertions, 9 deletions
diff --git a/db/08to09_pg.sql b/db/08to09_pg.sql
index 2eac5dadf..498a94e68 100644
--- a/db/08to09_pg.sql
+++ b/db/08to09_pg.sql
@@ -81,3 +81,42 @@ ALTER TABLE profile ADD COLUMN lon decimal(10,7) /*comment 'longitude'*/;
ALTER TABLE profile ADD COLUMN location_id integer /* comment 'location id if possible'*/;
ALTER TABLE profile ADD COLUMN location_ns integer /* comment 'namespace for location'*/;
+ALTER TABLE consumer add COLUMN consumer_secret varchar(255) not null ; /*comment 'secret value'*/
+
+ALTER TABLE token ADD COLUMN verifier varchar(255); /* comment 'verifier string for OAuth 1.0a',*/
+ALTER TABLE token ADD COLUMN verified_callback varchar(255); /* comment 'verified callback URL for OAuth 1.0a',*/
+
+create table queue_item_new (
+ id serial /* comment 'unique identifier'*/,
+ frame bytea not null /* comment 'data: object reference or opaque string'*/,
+ transport varchar(8) not null /*comment 'queue for what? "email", "jabber", "sms", "irc", ...'*/,
+ created timestamp not null default CURRENT_TIMESTAMP /*comment 'date this record was created'*/,
+ claimed timestamp /*comment 'date this item was claimed'*/,
+ PRIMARY KEY (id)
+);
+
+insert into queue_item_new (frame,transport,created,claimed)
+ select ('0x' || notice_id::text)::bytea,transport,created,claimed from queue_item;
+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)
+
+);
+
diff --git a/db/notice_source.sql b/db/notice_source.sql
index fbcdd6568..5d8664631 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()),
diff --git a/db/statusnet_pg.sql b/db/statusnet_pg.sql
index 9f97566a9..2db98550c 100644
--- a/db/statusnet_pg.sql
+++ b/db/statusnet_pg.sql
@@ -187,6 +187,7 @@ create index fave_modified_idx on fave using btree(modified);
create table consumer (
consumer_key varchar(255) primary key /* comment 'unique identifier, root URL' */,
+ consumer_secret varchar(255) not null /* comment 'secret value', */,
seed char(32) not null /* comment 'seed for new tokens by this consumer' */,
created timestamp not null default CURRENT_TIMESTAMP /* comment 'date this record was created' */,
@@ -200,6 +201,9 @@ create table token (
type integer not null default 0 /* comment 'request or access' */,
state integer default 0 /* comment 'for requests 0 = initial, 1 = authorized, 2 = used' */,
+ verifier varchar(255) /*comment 'verifier string for OAuth 1.0a'*/,
+ verified_callback varchar(255) /*comment 'verified callback URL for OAuth 1.0a'*/,
+
created timestamp not null default CURRENT_TIMESTAMP /* comment 'date this record was created' */,
modified timestamp /* comment 'date this record was modified' */,
@@ -272,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' */
);
@@ -283,14 +287,12 @@ create table remember_me (
);
create table queue_item (
-
- notice_id integer not null /* comment 'notice queued' */ references notice (id) ,
- transport varchar(8) not null /* comment 'queue for what? "email", "jabber", "sms", "irc", ...' */,
- created timestamp not null default CURRENT_TIMESTAMP /* comment 'date this record was created' */,
- claimed timestamp /* comment 'date this item was claimed' */,
-
- primary key (notice_id, transport)
-
+ id serial /* comment 'unique identifier'*/,
+ frame bytea not null /* comment 'data: object reference or opaque string'*/,
+ transport varchar(8) not null /*comment 'queue for what? "email", "jabber", "sms", "irc", ...'*/,
+ created timestamp not null default CURRENT_TIMESTAMP /*comment 'date this record was created'*/,
+ claimed timestamp /*comment 'date this item was claimed'*/,
+ PRIMARY KEY (id)
);
create index queue_item_created_idx on queue_item using btree(created);