mirror of
https://github.com/internetee/registry.git
synced 2025-07-01 08:43:37 +02:00
108624154-readeable_sql_added
This commit is contained in:
parent
737801d903
commit
5f7e4bc77e
1 changed files with 6 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
class AddIdentAutofill < ActiveRecord::Migration
|
||||
def change
|
||||
execute "
|
||||
execute <<-SQL
|
||||
CREATE OR REPLACE FUNCTION fill_ident_country()
|
||||
RETURNS BOOLEAN AS $$
|
||||
DECLARE
|
||||
|
@ -86,10 +86,13 @@ class AddIdentAutofill < ActiveRecord::Migration
|
|||
END LOOP;
|
||||
RETURN changed;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql;"
|
||||
$$ LANGUAGE plpgsql;
|
||||
SQL
|
||||
end
|
||||
|
||||
def down
|
||||
execute "DROP FUNCTION IF EXISTS fill_ident_country()"
|
||||
execute <<-SQL
|
||||
DROP FUNCTION IF EXISTS fill_ident_country()
|
||||
SQL
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue