From 75cac0fd6b94f77ec8ff32ebc89ec513ee102831 Mon Sep 17 00:00:00 2001
From: Craig Andrews <candrews@integralblue.com>
Date: Sat, 5 Dec 2009 21:03:27 -0500
Subject: Added 'login' command that gives you a link that can be used to login
 to the website

---
 db/statusnet.sql | 10 ++++++++++
 1 file changed, 10 insertions(+)

(limited to 'db/statusnet.sql')

diff --git a/db/statusnet.sql b/db/statusnet.sql
index f7b3b113b..18abcdfdb 100644
--- a/db/statusnet.sql
+++ b/db/statusnet.sql
@@ -575,3 +575,13 @@ create table location_namespace (
     modified timestamp comment 'date this record was modified'
 
 ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
+
+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 datetime not null comment 'date this record was created',
+    modified timestamp comment 'date this record was modified',
+
+    constraint primary key (user_id)
+) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
+
-- 
cgit v1.2.3-54-g00ecf


From add126bc6c6eb574e00f171c2107b0406b7015e5 Mon Sep 17 00:00:00 2001
From: Evan Prodromou <evan@status.net>
Date: Tue, 8 Dec 2009 14:56:11 -0500
Subject: add forward table

---
 db/statusnet.sql | 11 +++++++++++
 1 file changed, 11 insertions(+)

(limited to 'db/statusnet.sql')

diff --git a/db/statusnet.sql b/db/statusnet.sql
index 18abcdfdb..b500b81f2 100644
--- a/db/statusnet.sql
+++ b/db/statusnet.sql
@@ -585,3 +585,14 @@ create table login_token (
     constraint primary key (user_id)
 ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
 
+create table forward (
+
+    profile_id integer not null comment 'profile who forwarded the notice' references profile (id),
+    notice_id integer not null comment 'notice they forwarded' references notice (id),
+
+    created datetime not null comment 'date this record was created',
+
+    constraint primary key (profile_id, notice_id)
+
+) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
+
-- 
cgit v1.2.3-54-g00ecf


From dd098fee776fbb794080b8f95beab16b2f31556b Mon Sep 17 00:00:00 2001
From: Evan Prodromou <evan@status.net>
Date: Thu, 10 Dec 2009 14:34:47 -0500
Subject: remove forward table from db scripts

---
 classes/statusnet.ini | 10 ----------
 db/08to09.sql         | 12 ------------
 db/statusnet.sql      | 11 -----------
 3 files changed, 33 deletions(-)

(limited to 'db/statusnet.sql')

diff --git a/classes/statusnet.ini b/classes/statusnet.ini
index a5126795b..835faeb0b 100644
--- a/classes/statusnet.ini
+++ b/classes/statusnet.ini
@@ -1,4 +1,3 @@
-
 [avatar]
 profile_id = 129
 original = 17
@@ -196,15 +195,6 @@ id = K
 service = K
 uri = U
 
-[forward]
-profile_id = 129
-notice_id = 129
-created = 142
-
-[forward__keys]
-profile_id = K
-notice_id = K
-
 [group_alias]
 alias = 130
 group_id = 129
diff --git a/db/08to09.sql b/db/08to09.sql
index a945416ea..64640f4ce 100644
--- a/db/08to09.sql
+++ b/db/08to09.sql
@@ -82,15 +82,3 @@ create table login_token (
 
     constraint primary key (user_id)
 ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
-
-create table forward (
-
-    profile_id integer not null comment 'profile who forwarded the notice' references profile (id),
-    notice_id integer not null comment 'notice they forwarded' references notice (id),
-
-    created datetime not null comment 'date this record was created',
-
-    constraint primary key (profile_id, notice_id)
-
-) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
-
diff --git a/db/statusnet.sql b/db/statusnet.sql
index b500b81f2..18abcdfdb 100644
--- a/db/statusnet.sql
+++ b/db/statusnet.sql
@@ -585,14 +585,3 @@ create table login_token (
     constraint primary key (user_id)
 ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
 
-create table forward (
-
-    profile_id integer not null comment 'profile who forwarded the notice' references profile (id),
-    notice_id integer not null comment 'notice they forwarded' references notice (id),
-
-    created datetime not null comment 'date this record was created',
-
-    constraint primary key (profile_id, notice_id)
-
-) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
-
-- 
cgit v1.2.3-54-g00ecf


From 3d06431787430f7102087ee4a8a66319fcb50350 Mon Sep 17 00:00:00 2001
From: Evan Prodromou <evan@status.net>
Date: Fri, 11 Dec 2009 10:20:32 -0500
Subject: add repeat_of column to notice table

---
 db/08to09.sql       | 4 +++-
 db/08to09_pg.sql    | 1 +
 db/statusnet.sql    | 2 ++
 db/statusnet_pg.sql | 4 +++-
 4 files changed, 9 insertions(+), 2 deletions(-)

(limited to 'db/statusnet.sql')

diff --git a/db/08to09.sql b/db/08to09.sql
index 64640f4ce..28ec3ec16 100644
--- a/db/08to09.sql
+++ b/db/08to09.sql
@@ -4,8 +4,10 @@ alter table notice
      add column lon decimal(10,7) comment 'longitude',
      add column location_id integer comment 'location id if possible',
      add column location_ns integer comment 'namespace for location',
+     add column repeat_of integer comment 'notice this is a repeat of' references notice (id),
      drop index notice_profile_id_idx,
-     add index notice_profile_id_idx (profile_id,created,id);
+     add index notice_profile_id_idx (profile_id,created,id),
+     add index notice_repeatof_idx (repeat_of);
 
 alter table message
      modify column content text comment 'message content';
diff --git a/db/08to09_pg.sql b/db/08to09_pg.sql
index 1df8c249b..0398952f6 100644
--- a/db/08to09_pg.sql
+++ b/db/08to09_pg.sql
@@ -74,6 +74,7 @@ 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'*/;
diff --git a/db/statusnet.sql b/db/statusnet.sql
index 18abcdfdb..6b3c2ca06 100644
--- a/db/statusnet.sql
+++ b/db/statusnet.sql
@@ -129,11 +129,13 @@ create table notice (
     lon decimal(10,7) comment 'longitude',
     location_id integer comment 'location id if possible',
     location_ns integer comment 'namespace for location',
+    repeat_of integer comment 'notice this is a repeat of' references notice (id),
 
     index notice_profile_id_idx (profile_id,created,id),
     index notice_conversation_idx (conversation),
     index notice_created_idx (created),
     index notice_replyto_idx (reply_to),
+    index notice_repeatof_idx (repeat_of),
     FULLTEXT(content)
 ) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_general_ci;
 
diff --git a/db/statusnet_pg.sql b/db/statusnet_pg.sql
index c37fa81de..020bfd967 100644
--- a/db/statusnet_pg.sql
+++ b/db/statusnet_pg.sql
@@ -135,7 +135,9 @@ create table notice (
     lat decimal(10,7) /* comment 'latitude'*/ ,
     lon decimal(10,7) /* comment 'longitude'*/ ,
     location_id integer /* comment 'location id if possible'*/ ,
-    location_ns integer /* comment 'namespace for location'*/
+    location_ns integer /* comment 'namespace for location'*/ ,
+    repeat_of integer /* comment 'notice this is a repeat of' */ references notice (id) ,
+
 /*    FULLTEXT(content) */
 );
 
-- 
cgit v1.2.3-54-g00ecf

