Sha256: 234d8043e322fb19ca627ccb7f6c883512be9f064e34007551ddf89ca2c7c315
Contents?: true
Size: 1.06 KB
Versions: 6
Compression:
Stored size: 1.06 KB
Contents
# frozen_string_literal: true class UseEnhancedTextworkMd5Indexes < ActiveRecord::Migration[5.2] def up remove_index :decidim_enhanced_textwork_paragraphs, name: "decidim_enhanced_textwork_paragraph_title_search" remove_index :decidim_enhanced_textwork_paragraphs, name: "decidim_enhanced_textwork_paragraph_body_search" execute "CREATE INDEX decidim_enhanced_textwork_paragraph_title_search ON decidim_enhanced_textwork_paragraphs(md5(title::text))" execute "CREATE INDEX decidim_enhanced_textwork_paragraph_body_search ON decidim_enhanced_textwork_paragraphs(md5(body::text))" end def down remove_index :decidim_enhanced_textwork_paragraphs, name: "decidim_enhanced_textwork_paragraph_title_search" remove_index :decidim_enhanced_textwork_paragraphs, name: "decidim_enhanced_textwork_paragraph_body_search" add_index :decidim_enhanced_textwork_paragraphs, :title, name: "decidim_enhanced_textwork_paragraph_title_search" add_index :decidim_enhanced_textwork_paragraphs, :body, name: "decidim_enhanced_textwork_paragraph_body_search" end end
Version data entries
6 entries across 6 versions & 1 rubygems