From f0389034239cc7df4890fcffe93b43a2daea86c9 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Thu, 8 Mar 2018 15:25:10 +0800 Subject: [PATCH] Clean up unused function left in the database. --- .../20180308071922_drop_raise_read_only_function.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 db/migrate/20180308071922_drop_raise_read_only_function.rb diff --git a/db/migrate/20180308071922_drop_raise_read_only_function.rb b/db/migrate/20180308071922_drop_raise_read_only_function.rb new file mode 100644 index 00000000000..c652109610a --- /dev/null +++ b/db/migrate/20180308071922_drop_raise_read_only_function.rb @@ -0,0 +1,11 @@ +class DropRaiseReadOnlyFunction < ActiveRecord::Migration[5.1] + def up + ActiveRecord::Base.exec_sql( + "DROP FUNCTION IF EXISTS raise_read_only CASCADE;" + ) + end + + def down + raise ActiveRecord::IrreversibleMigration + end +end