Skip to content

Commit

Permalink
Merge pull request #1662 from dmitry-sinina/schema_independent_load_i…
Browse files Browse the repository at this point in the history
…nterface_in

Schema independend load_interface_in
  • Loading branch information
dmitry-sinina authored Dec 18, 2024
2 parents bdab72e + 1e355ea commit 9b4e8bb
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
30 changes: 30 additions & 0 deletions db/migrate/20241218154326_schema_independent_load_interface_in.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
class SchemaIndependentLoadInterfaceIn < ActiveRecord::Migration[7.0]

def up
execute %q{
CREATE or replace FUNCTION switch21.load_interface_in() RETURNS TABLE(varname character varying, vartype character varying, varformat character varying, varhashkey boolean, varparam character varying)
LANGUAGE plpgsql COST 10
AS $$
BEGIN
RETURN QUERY SELECT "name","type","format","hashkey","param" from switch21.switch_interface_in order by rank asc;
END;
$$;
}
end

def down
execute %q{
CREATE or replace FUNCTION switch21.load_interface_in() RETURNS TABLE(varname character varying, vartype character varying, varformat character varying, varhashkey boolean, varparam character varying)
LANGUAGE plpgsql COST 10
AS $$
BEGIN
RETURN QUERY SELECT "name","type","format","hashkey","param" from switch_interface_in order by rank asc;
END;
$$;
}
end
end
5 changes: 3 additions & 2 deletions db/structure.sql
Original file line number Diff line number Diff line change
Expand Up @@ -23280,7 +23280,7 @@ CREATE FUNCTION switch21.load_interface_in() RETURNS TABLE(varname character var
LANGUAGE plpgsql COST 10
AS $$
BEGIN
RETURN QUERY SELECT "name","type","format","hashkey","param" from switch_interface_in order by rank asc;
RETURN QUERY SELECT "name","type","format","hashkey","param" from switch21.switch_interface_in order by rank asc;
END;
$$;

Expand Down Expand Up @@ -50142,6 +50142,7 @@ INSERT INTO "public"."schema_migrations" (version) VALUES
('20241213172819'),
('20241213175248'),
('20241215155451'),
('20241216165130');
('20241216165130'),
('20241218154326');


0 comments on commit 9b4e8bb

Please sign in to comment.