Sha256: b0278c26aa49cc8fa684cb73b63980d8a9c76c0a57f6febe5916a3c5d151edb5

Contents?: true

Size: 394 Bytes

Versions: 50

Compression:

Stored size: 394 Bytes

Contents

class AddBackDefaultStringLimitsSwitchman < ActiveRecord::Migration[4.2]
  def up
    add_string_limit_if_missing :switchman_shards, :name
    add_string_limit_if_missing :switchman_shards, :database_server_id
  end

  def add_string_limit_if_missing(table, column)
    return if column_exists?(table, column, :string, limit: 255)
    change_column table, column, :string, limit: 255
  end
end

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
switchman-2.0.1 db/migrate/20161206323434_add_back_default_string_limits_switchman.rb
switchman-2.0.0 db/migrate/20161206323434_add_back_default_string_limits_switchman.rb
switchman-1.16.0 db/migrate/20161206323434_add_back_default_string_limits_switchman.rb
switchman-1.15.2 db/migrate/20161206323434_add_back_default_string_limits_switchman.rb
switchman-1.15.1 db/migrate/20161206323434_add_back_default_string_limits_switchman.rb
switchman-1.15.0 db/migrate/20161206323434_add_back_default_string_limits_switchman.rb
switchman-1.14.10 db/migrate/20161206323434_add_back_default_string_limits_switchman.rb
switchman-1.14.9 db/migrate/20161206323434_add_back_default_string_limits_switchman.rb
switchman-1.14.8 db/migrate/20161206323434_add_back_default_string_limits_switchman.rb
switchman-1.14.7 db/migrate/20161206323434_add_back_default_string_limits_switchman.rb
switchman-1.14.6 db/migrate/20161206323434_add_back_default_string_limits_switchman.rb
switchman-1.14.5 db/migrate/20161206323434_add_back_default_string_limits_switchman.rb
switchman-1.14.4 db/migrate/20161206323434_add_back_default_string_limits_switchman.rb
switchman-1.14.3 db/migrate/20161206323434_add_back_default_string_limits_switchman.rb
switchman-1.14.2 db/migrate/20161206323434_add_back_default_string_limits_switchman.rb
switchman-1.14.1 db/migrate/20161206323434_add_back_default_string_limits_switchman.rb
switchman-1.14.0 db/migrate/20161206323434_add_back_default_string_limits_switchman.rb
switchman-1.13.3 db/migrate/20161206323434_add_back_default_string_limits_switchman.rb
switchman-1.13.2 db/migrate/20161206323434_add_back_default_string_limits_switchman.rb
switchman-1.13.1 db/migrate/20161206323434_add_back_default_string_limits_switchman.rb