Sha256: ba16c7e40156a676a90d0993099fbab3af0aaaee010444f770f8fe686fe47b70
Contents?: true
Size: 593 Bytes
Versions: 22
Compression:
Stored size: 593 Bytes
Contents
# frozen_string_literal: true class AddTimestampsToShards < ActiveRecord::Migration[4.2] def change add_timestamps :switchman_shards, null: true now = Time.now.utc Switchman::Shard.update_all(updated_at: now, created_at: now) if Switchman::Shard.current.default? change_column_null :switchman_shards, :updated_at, false change_column_null :switchman_shards, :created_at, false if Switchman::Shard.current.default? Switchman::Shard.connection.schema_cache.clear! Switchman::Shard.reset_column_information Switchman::Shard.columns end end end
Version data entries
22 entries across 22 versions & 1 rubygems