mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-08 00:23:01 +08:00
17 lines
335 B
Ruby
17 lines
335 B
Ruby
|
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
|