You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
boundary/internal/db/schema/migrations/postgres/2/20_pass.up.sql

29 lines
754 B

begin;
-- auth_password_method_with_is_primary is useful for reading a password auth
-- method with a bool to determine if it's the scope's primary auth method.
create view auth_password_method_with_is_primary as
select
case when s.primary_auth_method_id is not null then
true
else false end
as is_primary_auth_method,
am.public_id,
am.scope_id,
am.password_conf_id,
am.name,
am.description,
am.create_time,
am.update_time,
am.version,
am.min_login_name_length,
am.min_password_length
from
auth_password_method am
left outer join iam_scope s on am.public_id = s.primary_auth_method_id;
comment on view auth_password_method_with_is_primary is
'password auth method with an is_primary_auth_method bool';
commit;