Sha256: 2762631b71b0a6033d92cda195c17746fb364fabcdd3441ed31212f448284ba7
Contents?: true
Size: 925 Bytes
Versions: 70
Compression:
Stored size: 925 Bytes
Contents
# frozen_string_literal: true class UseMd5Indexes < ActiveRecord::Migration[5.2] def up remove_index :decidim_proposals_proposals, name: "decidim_proposals_proposal_title_search" remove_index :decidim_proposals_proposals, name: "decidim_proposals_proposal_body_search" execute "CREATE INDEX decidim_proposals_proposal_title_search ON decidim_proposals_proposals(md5(title::text))" execute "CREATE INDEX decidim_proposals_proposal_body_search ON decidim_proposals_proposals(md5(body::text))" end def down remove_index :decidim_proposals_proposals, name: "decidim_proposals_proposal_title_search" remove_index :decidim_proposals_proposals, name: "decidim_proposals_proposal_body_search" add_index :decidim_proposals_proposals, :title, name: "decidim_proposals_proposal_title_search" add_index :decidim_proposals_proposals, :body, name: "decidim_proposals_proposal_body_search" end end
Version data entries
70 entries across 70 versions & 1 rubygems