[Fusionforge-commits] r15184 - in trunk: . src/db

Roland Mas lolando at fusionforge.org
Thu Mar 22 11:56:13 CET 2012


Author: lolando
Date: 2012-03-22 11:56:12 +0100 (Thu, 22 Mar 2012)
New Revision: 15184

Added:
   trunk/src/db/20120322-add-news-in-activity_vw.sql
Removed:
   trunk/src/db/20120321-add-news-in-activity_vw.sql
Modified:
   trunk/
Log:
Renamed SQL file so that it doesn't differ across branches

Deleted: trunk/src/db/20120321-add-news-in-activity_vw.sql
===================================================================
--- trunk/src/db/20120321-add-news-in-activity_vw.sql	2012-03-21 17:49:06 UTC (rev 15183)
+++ trunk/src/db/20120321-add-news-in-activity_vw.sql	2012-03-22 10:56:12 UTC (rev 15184)
@@ -1,37 +0,0 @@
-CREATE OR REPLACE VIEW activity_vw AS
-SELECT
-agl.group_id, 'trackeropen'::text AS section, agl.group_artifact_id AS ref_id,
-a.artifact_id as subref_id, a.summary as description, a.open_date AS activity_date, u.user_id, u.user_name, u.realname
-FROM artifact_group_list agl JOIN artifact a using (group_artifact_id),
-users u WHERE u.user_id=a.submitted_by
-UNION
-SELECT
-agl.group_id, 'trackerclose'::text AS section, agl.group_artifact_id AS ref_id,
-a.artifact_id as subref_id, a.summary as description, a.close_date AS activity_date, u.user_id, u.user_name, u.realname
-FROM artifact_group_list agl JOIN artifact a using (group_artifact_id), users u WHERE u.user_id=a.assigned_to
---actually should join against
-AND a.close_date > 0
-UNION
-SELECT
-frsp.group_id, 'frsrelease'::text as section,frsp.package_id as ref_id,
-frsr.release_id as subref_id, frsr.name AS description, frsr.release_date AS activity_date,
-u.user_id, u.user_name, u.realname FROM frs_package frsp JOIN frs_release frsr USING (package_id), users u WHERE
-u.user_id=frsr.released_by
-UNION
-SELECT
-fgl.group_id, 'forumpost'::text as section,fgl.group_forum_id as ref_id, forum.msg_id
-as subref_id, forum.subject AS description, forum.post_date AS activity_date, u.user_id,
-u.user_name, u.realname FROM forum_group_list fgl JOIN forum USING (group_forum_id), users u WHERE
-u.user_id=forum.posted_by
-UNION
-SELECT group_id, 'docmannew'::text AS section, doc_group AS ref_id, docid AS subref_id,
-filename AS description, createdate AS activity_date, created_by as user_id,
-user_name, realname FROM docdata_vw
-UNION
-SELECT group_id, 'docmanupdate'::text AS section, doc_group AS ref_id, docid AS subref_id,
-filename AS description, updatedate AS activity_date, created_by as user_id,
-user_name, realname FROM docdata_vw
-UNION
-SELECT news_bytes.group_id,'news' AS section,news_bytes.id AS ref_id,news_bytes.forum_id AS subref_id,
-news_bytes.summary AS description, news_bytes.post_date AS activity_date, u.user_id, u.user_name, u.realname
-FROM news_bytes, users u WHERE u.user_id = news_bytes.submitted_by;

Copied: trunk/src/db/20120322-add-news-in-activity_vw.sql (from rev 15181, trunk/src/db/20120321-add-news-in-activity_vw.sql)
===================================================================
--- trunk/src/db/20120322-add-news-in-activity_vw.sql	                        (rev 0)
+++ trunk/src/db/20120322-add-news-in-activity_vw.sql	2012-03-22 10:56:12 UTC (rev 15184)
@@ -0,0 +1,37 @@
+CREATE OR REPLACE VIEW activity_vw AS
+SELECT
+agl.group_id, 'trackeropen'::text AS section, agl.group_artifact_id AS ref_id,
+a.artifact_id as subref_id, a.summary as description, a.open_date AS activity_date, u.user_id, u.user_name, u.realname
+FROM artifact_group_list agl JOIN artifact a using (group_artifact_id),
+users u WHERE u.user_id=a.submitted_by
+UNION
+SELECT
+agl.group_id, 'trackerclose'::text AS section, agl.group_artifact_id AS ref_id,
+a.artifact_id as subref_id, a.summary as description, a.close_date AS activity_date, u.user_id, u.user_name, u.realname
+FROM artifact_group_list agl JOIN artifact a using (group_artifact_id), users u WHERE u.user_id=a.assigned_to
+--actually should join against
+AND a.close_date > 0
+UNION
+SELECT
+frsp.group_id, 'frsrelease'::text as section,frsp.package_id as ref_id,
+frsr.release_id as subref_id, frsr.name AS description, frsr.release_date AS activity_date,
+u.user_id, u.user_name, u.realname FROM frs_package frsp JOIN frs_release frsr USING (package_id), users u WHERE
+u.user_id=frsr.released_by
+UNION
+SELECT
+fgl.group_id, 'forumpost'::text as section,fgl.group_forum_id as ref_id, forum.msg_id
+as subref_id, forum.subject AS description, forum.post_date AS activity_date, u.user_id,
+u.user_name, u.realname FROM forum_group_list fgl JOIN forum USING (group_forum_id), users u WHERE
+u.user_id=forum.posted_by
+UNION
+SELECT group_id, 'docmannew'::text AS section, doc_group AS ref_id, docid AS subref_id,
+filename AS description, createdate AS activity_date, created_by as user_id,
+user_name, realname FROM docdata_vw
+UNION
+SELECT group_id, 'docmanupdate'::text AS section, doc_group AS ref_id, docid AS subref_id,
+filename AS description, updatedate AS activity_date, created_by as user_id,
+user_name, realname FROM docdata_vw
+UNION
+SELECT news_bytes.group_id,'news' AS section,news_bytes.id AS ref_id,news_bytes.forum_id AS subref_id,
+news_bytes.summary AS description, news_bytes.post_date AS activity_date, u.user_id, u.user_name, u.realname
+FROM news_bytes, users u WHERE u.user_id = news_bytes.submitted_by;




More information about the Fusionforge-commits mailing list