Sha256: ab22468a36eae48a8b9e5bd02fb1680d272bb57ca8f5b3c6f1401d1ba5bb3a38
Contents?: true
Size: 625 Bytes
Versions: 8
Compression:
Stored size: 625 Bytes
Contents
# frozen_string_literal: true class ChangeFlipperGatesValueToText < ActiveRecord::Migration<%= migration_version %> def up # Ensure this incremental update migration is idempotent return unless connection.column_exists? :flipper_gates, :value, :string if index_exists? :flipper_gates, [:feature_key, :key, :value] remove_index :flipper_gates, [:feature_key, :key, :value] end change_column :flipper_gates, :value, :text add_index :flipper_gates, [:feature_key, :key, :value], unique: true, length: { value: 255 } end def down change_column :flipper_gates, :value, :string end end
Version data entries
8 entries across 8 versions & 1 rubygems