diff options
author | Zach Copley <zach@controlyourself.ca> | 2009-07-07 20:15:05 +0000 |
---|---|---|
committer | Zach Copley <zach@controlyourself.ca> | 2009-07-07 20:15:05 +0000 |
commit | 673cdab874422634a3be8afc009fbd983c73e572 (patch) | |
tree | 9511e55f65232e7e931d0ba02cef1b4a4310ac7b | |
parent | 8bc924224b96928e9d41a18a83f515e5e53ba4f7 (diff) | |
parent | d846c5fc9927b93e59192e19fd59a8d350b0e3c9 (diff) |
Merge branch '0.8.x' of git@gitorious.org:laconica/dev into 0.8.x
-rw-r--r-- | actions/favorited.php | 2 | ||||
-rw-r--r-- | db/laconica_pg.sql | 26 | ||||
-rw-r--r-- | lib/popularnoticesection.php | 2 |
3 files changed, 22 insertions, 8 deletions
diff --git a/actions/favorited.php b/actions/favorited.php index c902d80f5..156c7a700 100644 --- a/actions/favorited.php +++ b/actions/favorited.php @@ -194,7 +194,7 @@ class FavoritedAction extends Action $qry = 'SELECT notice.*, '. $weightexpr . ' as weight ' . 'FROM notice JOIN fave ON notice.id = fave.notice_id ' . - 'GROUP BY id,profile_id,uri,content,rendered,url,created,notice.modified,reply_to,is_local,source ' . + 'GROUP BY id,profile_id,uri,content,rendered,url,created,notice.modified,reply_to,is_local,source,notice.conversation ' . 'ORDER BY weight DESC'; $offset = ($this->page - 1) * NOTICES_PER_PAGE; diff --git a/db/laconica_pg.sql b/db/laconica_pg.sql index b213bbd50..dae8b8faf 100644 --- a/db/laconica_pg.sql +++ b/db/laconica_pg.sql @@ -116,7 +116,9 @@ create table notice ( modified timestamp /* comment 'date this record was modified' */,
reply_to integer /* comment 'notice replied to (usually a guess)' */ references notice (id) ,
is_local integer default 0 /* comment 'notice was generated by a user' */,
- source varchar(32) /* comment 'source of comment, like "web", "im", or "clientname"' */
+ source varchar(32) /* comment 'source of comment, like "web", "im", or "clientname"' */,
+ conversation integer /*id of root notice in this conversation' */ references notice (id)
+
/* FULLTEXT(content) */
);
@@ -172,7 +174,7 @@ create table token ( tok char(32) not null /* comment 'identifying value' */,
secret char(32) not null /* comment 'secret value' */,
type integer not null default 0 /* comment 'request or access' */,
- state integer default 0 /* comment 'for requests; 0 = initial, 1 = authorized, 2 = used' */,
+ state integer default 0 /* comment 'for requests 0 = initial, 1 = authorized, 2 = used' */,
created timestamp not null default CURRENT_TIMESTAMP /* comment 'date this record was created' */,
modified timestamp /* comment 'date this record was modified' */,
@@ -346,7 +348,7 @@ create table notice_inbox ( user_id integer not null /* comment 'user receiving the message' */ references "user" (id),
notice_id integer not null /* comment 'notice received' */ references notice (id),
created timestamp not null default CURRENT_TIMESTAMP /* comment 'date the notice was created' */,
- source integer default 1 /* comment 'reason it is in the inbox; 1=subscription' */,
+ source integer default 1 /* comment 'reason it is in the inbox: 1=subscription' */,
primary key (user_id, notice_id)
);
@@ -436,8 +438,8 @@ create table file ( mimetype varchar(50),
size integer,
title varchar(255),
- date integer(11),
- protected integer(1)
+ date integer,
+ protected integer
);
create sequence file_oembed_seq;
@@ -454,7 +456,7 @@ create table file_oembed ( title varchar(255),
author_name varchar(50),
author_url varchar(255),
- url varchar(255),
+ url varchar(255)
);
create sequence file_redirection_seq;
@@ -484,6 +486,18 @@ create table file_to_post ( unique(file_id, post_id)
);
+create sequence design_seq;
+create table design (
+ id bigint default nextval('design_seq') /* comment 'design ID'*/,
+ backgroundcolor integer /* comment 'main background color'*/ ,
+ contentcolor integer /*comment 'content area background color'*/ ,
+ sidebarcolor integer /*comment 'sidebar background color'*/ ,
+ textcolor integer /*comment 'text color'*/ ,
+ linkcolor integer /*comment 'link color'*/,
+ backgroundimage varchar(255) /*comment 'background image, if any'*/,
+ disposition int default 1 /*comment 'bit 1 = hide background image, bit 2 = display background image, bit 4 = tile background image'*/,
+ primary key (id)
+);
/* Textsearch stuff */
diff --git a/lib/popularnoticesection.php b/lib/popularnoticesection.php index 375d5538b..e47c9b385 100644 --- a/lib/popularnoticesection.php +++ b/lib/popularnoticesection.php @@ -68,7 +68,7 @@ class PopularNoticeSection extends NoticeSection } $qry .= ' GROUP BY notice.id,notice.profile_id,notice.content,notice.uri,' . 'notice.rendered,notice.url,notice.created,notice.modified,' . - 'notice.reply_to,notice.is_local,notice.source ' . + 'notice.reply_to,notice.is_local,notice.source,notice.conversation ' . 'ORDER BY weight DESC'; $offset = 0; |