Sha256: 889afed35907fb915365447c244a25ba9a77534ad13b9913e0fe7f3bf2609a09

Contents?: true

Size: 663 Bytes

Versions: 21

Compression:

Stored size: 663 Bytes

Contents

module StrongMigrations
  module Migrator
    def ddl_transaction(migration, *args)
      return super unless StrongMigrations.lock_timeout_retries > 0 && use_transaction?(migration)

      # handle MigrationProxy class
      migration = migration.send(:migration) if migration.respond_to?(:migration, true)

      # retry migration since the entire transaction needs to be rerun
      checker = migration.send(:strong_migrations_checker)
      checker.retry_lock_timeouts(check_committed: true) do
        # failed transaction reverts timeout, so need to re-apply
        checker.timeouts_set = false

        super(migration, *args)
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
strong_migrations-2.0.1 lib/strong_migrations/migrator.rb
strong_migrations-2.0.0 lib/strong_migrations/migrator.rb
strong_migrations-1.8.0 lib/strong_migrations/migrator.rb
strong_migrations-1.7.0 lib/strong_migrations/migrator.rb
strong_migrations-1.6.4 lib/strong_migrations/migrator.rb
strong_migrations-1.6.3 lib/strong_migrations/migrator.rb
strong_migrations-1.6.2 lib/strong_migrations/migrator.rb
strong_migrations-1.6.1 lib/strong_migrations/migrator.rb
strong_migrations-1.6.0 lib/strong_migrations/migrator.rb
strong_migrations-1.5.0 lib/strong_migrations/migrator.rb
strong_migrations-1.4.4 lib/strong_migrations/migrator.rb
strong_migrations-1.4.3 lib/strong_migrations/migrator.rb
strong_migrations-1.4.2 lib/strong_migrations/migrator.rb
strong_migrations-1.4.1 lib/strong_migrations/migrator.rb
strong_migrations-1.4.0 lib/strong_migrations/migrator.rb
strong_migrations-1.3.2 lib/strong_migrations/migrator.rb
strong_migrations-1.3.1 lib/strong_migrations/migrator.rb
strong_migrations-1.3.0 lib/strong_migrations/migrator.rb
strong_migrations-1.2.0 lib/strong_migrations/migrator.rb
strong_migrations-1.1.0 lib/strong_migrations/migrator.rb