class Cardio::Migration::Transform
for migrations involving data transformations (but not schema changes)
Private Instance Methods
Source
# File lib/cardio/migration/transform.rb, line 33 def contentedly return yield if ENV["NO_CARD_LOAD"] Card::Cache.reset_all Card::Auth.as_bot do yield ensure ::Card::Cache.reset_all end end
Source
# File lib/cardio/migration/transform.rb, line 24 def exec_migration conn, direction return super if respond_to? :change @connection = conn contentedly { send direction } ensure @connection = nil end
Execute this migration in the named direction override ActiveRecord to wrap ‘up’ in ‘contentedly’
Calls superclass method
Source
# File lib/cardio/migration/transform.rb, line 15 def with_migration_table self.table_name = "transform_migrations" yield ensure self.table_name = "schema_migrations" end