scinote-web/db/migrate/20151103155048_add_btree_gist_extension.rb

17 lines
335 B
Ruby
Raw Normal View History

2016-02-12 23:52:43 +08:00
require File.expand_path('app/helpers/database_helper')
include DatabaseHelper
class AddBtreeGistExtension < ActiveRecord::Migration
def up
if db_adapter_is? "PostgreSQL" then
create_extension :btree_gist
end
end
def down
if db_adapter_is? "PostgreSQL" then
drop_extension :btree_gist
end
end
end