-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1662 from dmitry-sinina/schema_independent_load_i…
…nterface_in Schema independend load_interface_in
- Loading branch information
Showing
2 changed files
with
33 additions
and
2 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
db/migrate/20241218154326_schema_independent_load_interface_in.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters