mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-24 16:18:42 -05:00
14 lines
322 B
Ruby
14 lines
322 B
Ruby
class AddIndexToPostCustomFields < ActiveRecord::Migration
|
|
def up
|
|
execute <<SQL
|
|
CREATE INDEX index_post_custom_fields_on_name_and_value ON post_custom_fields USING btree (name, left(value, 200))
|
|
SQL
|
|
end
|
|
|
|
def down
|
|
execute <<SQL
|
|
DROP INDEX index_post_custom_fields_on_name_and_value
|
|
SQL
|
|
|
|
end
|
|
end
|