mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-28 19:24:10 +08:00
5f9c04844f
* Added prefixed IDs to repository rows (items) [SCI-5909] * Fix prefixed id queries to work with joins, use subquery in repository search [SCI-5909] * Fixed accessing repository_row parent code [SCI-5909] * Better handling of repository_row code display [SCI-5909] * Fix index warning for id prefixed models issue setting up project [SCI-5909]
14 lines
408 B
Ruby
14 lines
408 B
Ruby
# frozen_string_literal: true
|
|
|
|
class AddRepositoryRowCodeIndex < ActiveRecord::Migration[6.1]
|
|
def up
|
|
ActiveRecord::Base.connection.execute(
|
|
"CREATE INDEX index_repository_rows_on_repository_row_code ON "\
|
|
"repository_rows using gin (('IT'::text || id) gin_trgm_ops);"
|
|
)
|
|
end
|
|
|
|
def down
|
|
remove_index :repository_rows, name: 'index_repository_rows_on_repository_row_code'
|
|
end
|
|
end
|