Sha256: 74675a2e1f2fb5ca01e9847b72b119ae2dc4095ebe91a3b1da8b244a8fc5b49d

Contents?: true

Size: 824 Bytes

Versions: 7

Compression:

Stored size: 824 Bytes

Contents

create or replace function f_fixfalse(s text) returns text as $$
begin
    return case when s = 'false' then null else s end;
end
$$ language plpgsql;

drop view if exists vw_marty_postings;
create or replace view vw_marty_postings as
select
    concat(u.firstname, ' ', u.lastname) AS user_name,
    concat(ou.firstname, ' ', ou.lastname) AS obsoleted_user,
    main.id,
    main.group_id,
    main.created_dt,
    main.obsoleted_dt,
    main.name,
    marty_posting_types1.name as posting_type_name,
    marty_posting_types1.id as post_type_id
from marty_postings main
    join marty_users u on main.user_id = u.id
    left join marty_users ou on main.o_user_id = ou.id
    left join marty_posting_types marty_posting_types1 on main.posting_type_id = marty_posting_types1.id;

grant select on vw_marty_postings to public;

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
marty-0.5.36 spec/lib/migrations/vw_marty_postings.sql.expected
marty-0.5.35 spec/lib/migrations/vw_marty_postings.sql.expected
marty-0.5.34 spec/lib/migrations/vw_marty_postings.sql.expected
marty-0.5.33 spec/lib/migrations/vw_marty_postings.sql.expected
marty-0.5.32 spec/lib/migrations/vw_marty_postings.sql.expected
marty-0.5.31 spec/lib/migrations/vw_marty_postings.sql.expected
marty-0.5.30 spec/lib/migrations/vw_marty_postings.sql.expected