Skip to content

Commit

Permalink
Fix the aaa.user view so that it uses user_id instead of id. I'm rese…
Browse files Browse the repository at this point in the history
…rving "id" for tables that are actually the PRIMARY KEY().

Signed-off-by: Sean Chittenden <sean@chittenden.org>
  • Loading branch information
sean- committed Jun 10, 2011
1 parent 338e589 commit 28606ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sql/initialize/280_views.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
-- or registration_ip. Users must always present their own email address and
-- have their email address used to lookup their email_id.
CREATE OR REPLACE VIEW
aaa.user (id, active, registration_utc, max_concurrent_sessions,
aaa.user (user_id, active, registration_utc, max_concurrent_sessions,
default_ipv4_mask, default_ipv6_mask, timezone_id) AS
SELECT
u.id, u.active, u.registration_utc, u.max_concurrent_sessions,
u.id AS user_id, u.active, u.registration_utc, u.max_concurrent_sessions,
u.default_ipv4_mask, u.default_ipv6_mask, ui.timezone_id
FROM
shadow.aaa_user AS u LEFT OUTER JOIN aaa.user_info AS ui ON (u.id = ui.user_id);
Expand Down

0 comments on commit 28606ee

Please sign in to comment.