]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - db/08to09_pg.sql
Blow more timeline caches on notice delete. Fixes paging on public and profile timeli...
[quix0rs-gnu-social.git] / db / 08to09_pg.sql
index d9b57fb8414702bd947de854693b24717361b165..2eac5dadf38bf4a5cc609871ff811fa619969725 100644 (file)
@@ -29,13 +29,23 @@ create table config (
 
 );
 
-create table user_role (
+create table profile_role (
 
-    user_id integer not null /* comment 'user having the role'*/ references "user" (id),
+    profile_id integer not null /* comment 'account having the role'*/ references profile (id),
     role    varchar(32) not null /* comment 'string representing the role'*/,
     created timestamp /* not null comment 'date the role was granted'*/,
 
-    primary key (user_id, role)
+    primary key (profile_id, 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)
 
 );
 
@@ -60,3 +70,14 @@ CREATE index subscription_subscribed_idx ON subscription (subscribed,created);
 DROP index notice_profile_id_idx;
 CREATE index notice_profile_id_idx ON notice (profile_id,created,id);
 
+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'*/;
+