Skip to content
This repository has been archived by the owner on Sep 12, 2018. It is now read-only.

Commit

Permalink
Group: Fixed to show group's projects
Browse files Browse the repository at this point in the history
Some projects were not shown even to users who has right to see them.

I'm not sure what was the reason, the project's owner value and the group's name value
has different case for the first letter.

This commit contains a sql that finds all those projects and set the right organization id value to it.
  • Loading branch information
Keesun Baik committed Aug 25, 2014
1 parent 13ae831 commit f47de29
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions conf/evolutions/default/90.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# --- !Ups

UPDATE project p SET p.organization_id =
(
SELECT o.id
FROM organization o
WHERE UPPER(p.owner) = UPPER(o.name)
)
WHERE p.id IN
(
SELECT p.id
FROM project p LEFT JOIN organization o ON UPPER(p.owner) = UPPER(o.name)
WHERE UPPER(p.owner) = UPPER(o.name) AND p.organization_id IS NULL
);

# --- !Downs

0 comments on commit f47de29

Please sign in to comment.