summaryrefslogtreecommitdiff
path: root/db/08to09_pg.sql
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-12-22 16:44:19 -0800
committerEvan Prodromou <evan@status.net>2009-12-22 16:44:19 -0800
commitf6bf9529805cd58fdd1671dd9b133bde05e8ae87 (patch)
treecf272bd1105da48f016b635db4d9c34810adcbda /db/08to09_pg.sql
parentf987273f118a12d443b6789c2ab59d7a4b01f678 (diff)
parent30c2e2ce83282f0bc268153d7ec465fbb5cf00ca (diff)
Merge branch 'testing'
Diffstat (limited to 'db/08to09_pg.sql')
-rw-r--r--db/08to09_pg.sql22
1 files changed, 21 insertions, 1 deletions
diff --git a/db/08to09_pg.sql b/db/08to09_pg.sql
index b312d47dd..2eac5dadf 100644
--- a/db/08to09_pg.sql
+++ b/db/08to09_pg.sql
@@ -39,6 +39,25 @@ create table profile_role (
);
+create table location_namespace (
+
+ id integer /*comment 'identity for this namespace'*/,
+ description text /* comment 'description of the namespace'*/ ,
+ created integer not null /*comment 'date the record was created*/ ,
+ /* modified timestamp comment 'date this record was modified',*/
+ primary key (id)
+
+);
+
+create table login_token (
+ user_id integer not null /* comment 'user owning this token'*/ references "user" (id),
+ token char(32) not null /* comment 'token useable for logging in'*/,
+ created timestamp not null DEFAULT CURRENT_TIMESTAMP /* comment 'date this record was created'*/,
+ modified timestamp /* comment 'date this record was modified'*/,
+
+ primary key (user_id)
+);
+
DROP index fave_user_id_idx;
CREATE index fave_user_id_idx on fave (user_id,modified);
@@ -55,9 +74,10 @@ ALTER TABLE notice ADD COLUMN lat decimal(10, 7) /* comment 'latitude'*/;
ALTER TABLE notice ADD COLUMN lon decimal(10,7) /* comment 'longitude'*/;
ALTER TABLE notice ADD COLUMN location_id integer /* comment 'location id if possible'*/ ;
ALTER TABLE notice ADD COLUMN location_ns integer /* comment 'namespace for location'*/;
+ALTER TABLE notice ADD COLUMN repeat_of integer /* comment 'notice this is a repeat of' */ references notice (id);
ALTER TABLE profile ADD COLUMN lat decimal(10,7) /*comment 'latitude'*/ ;
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'*/;
- \ No newline at end of file
+