mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-14 21:24:54 +08:00
17 lines
324 B
Ruby
17 lines
324 B
Ruby
|
require File.expand_path('app/helpers/database_helper')
|
||
|
include DatabaseHelper
|
||
|
|
||
|
class AddPgTrgmSupport < ActiveRecord::Migration
|
||
|
def up
|
||
|
if db_adapter_is? "PostgreSQL" then
|
||
|
create_extension :pg_trgm
|
||
|
end
|
||
|
end
|
||
|
|
||
|
def down
|
||
|
if db_adapter_is? "PostgreSQL" then
|
||
|
drop_extension :pg_trgm
|
||
|
end
|
||
|
end
|
||
|
end
|