mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-28 07:54:28 +08:00
* Remove check for database in migrations [SCI-11213] * Bump version to 1.37.0.1 * Bump version to 1.38.0.1 --------- Co-authored-by: Andrej <andrej.jugovic7@gmail.com>
17 lines
488 B
Ruby
17 lines
488 B
Ruby
require File.expand_path('app/helpers/database_helper')
|
|
include DatabaseHelper
|
|
|
|
class AddSearchIndexesToRepositories < ActiveRecord::Migration[4.2]
|
|
def up
|
|
if index_exists?(:repository_rows, :name)
|
|
remove_index :repository_rows, :name
|
|
end
|
|
add_gin_index_without_tags :repository_rows, :name
|
|
add_gin_index_without_tags :repository_text_values, :data
|
|
end
|
|
|
|
def down
|
|
remove_index :repository_rows, :name
|
|
remove_index :repository_text_values, :data
|
|
end
|
|
end
|