Project

General

Profile

« Previous | Next » 

Revision 57542

users management

View differences:

schema.sql
1 1
DROP VIEW organizations_view;
2 2
DROP VIEW organizations_simple_view;
3
DROP VIEW users_view;
3 4

  
4 5
DROP TABLE IF EXISTS other_ids;
5 6
DROP TABLE IF EXISTS other_names;
......
182 183
    org.type,
183 184
	org.city,
184 185
	org.country;
186
	
187
CREATE VIEW	users_view AS SELECT
188
	u.email,
189
	u.valid,
190
	u.role,
191
	array_agg(uc.country) AS countries
192
FROM
193
	users u
194
	LEFT OUTER JOIN user_countries uc ON (u.email = uc.email)
195
GROUP BY u.email, u.valid, u.role
196
ORDER BY u.email;
197

  
198

  
185 199
	

Also available in: Unified diff