Sha256: d6653f28c3a37d652bb900cd8bd55976ef2c07afabd36b26e1ba8221647b6d66
Contents?: true
Size: 664 Bytes
Versions: 22
Compression:
Stored size: 664 Bytes
Contents
# frozen_string_literal: true class CreateGoodJobLabelsIndex < ActiveRecord::Migration<%= migration_version %> disable_ddl_transaction! def change reversible do |dir| dir.up do unless connection.index_name_exists?(:good_jobs, :index_good_jobs_on_labels) add_index :good_jobs, :labels, using: :gin, where: "(labels IS NOT NULL)", name: :index_good_jobs_on_labels, algorithm: :concurrently end end dir.down do if connection.index_name_exists?(:good_jobs, :index_good_jobs_on_labels) remove_index :good_jobs, name: :index_good_jobs_on_labels end end end end end
Version data entries
22 entries across 22 versions & 1 rubygems