Sha256: 018a9d0ab04c54c72d69029d1259c107d05a60f50683ad7a1141a83998222059

Contents?: true

Size: 765 Bytes

Versions: 163

Compression:

Stored size: 765 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
    u.login AS user_name,
    ou.login 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

163 entries across 163 versions & 1 rubygems

Version Path
marty-0.5.40 spec/lib/migrations/vw_marty_postings.sql.expected
marty-0.5.39 spec/lib/migrations/vw_marty_postings.sql.expected
marty-0.5.38 spec/lib/migrations/vw_marty_postings.sql.expected