Sha256: 74c4950b38f5d8438bd729baf8197d39dc6b5ff5f08b8f63a2a43db2a33f1143

Contents?: true

Size: 448 Bytes

Versions: 55

Compression:

Stored size: 448 Bytes

Contents

# frozen_string_literal: true

require "symbiont"

Sequel::SimpleMigration.prepend(Module.new do
  def apply(db, direction)
    # :nocov:
    unless [:up, :down].include?(direction) # NOTE: original code
      raise(ArgumentError, "Invalid migration direction specified (#{direction.inspect})")
    end
    # :nocov:

    # NOTE: our extension
    prok = public_send(direction)
    Symbiont::Executor.evaluate_private(db, &prok) if prok
  end
end)

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
umbrellio-sequel-plugins-0.17.0 lib/sequel/extensions/methods_in_migrations.rb
umbrellio-sequel-plugins-0.16.1 lib/sequel/extensions/methods_in_migrations.rb
umbrellio-sequel-plugins-0.16.0.239 lib/sequel/extensions/methods_in_migrations.rb
umbrellio-sequel-plugins-0.16.0.238 lib/sequel/extensions/methods_in_migrations.rb
umbrellio-sequel-plugins-0.16.0.235 lib/sequel/extensions/methods_in_migrations.rb
umbrellio-sequel-plugins-0.16.0.234 lib/sequel/extensions/methods_in_migrations.rb
umbrellio-sequel-plugins-0.16.0.233 lib/sequel/extensions/methods_in_migrations.rb
umbrellio-sequel-plugins-0.16.0 lib/sequel/extensions/methods_in_migrations.rb
umbrellio-sequel-plugins-0.16.0.211 lib/sequel/extensions/methods_in_migrations.rb
umbrellio-sequel-plugins-0.15.0.198 lib/sequel/extensions/methods_in_migrations.rb
umbrellio-sequel-plugins-0.14.0.192 lib/sequel/extensions/methods_in_migrations.rb
umbrellio-sequel-plugins-0.14.0.189 lib/sequel/extensions/methods_in_migrations.rb
umbrellio-sequel-plugins-0.14.0.188 lib/sequel/extensions/methods_in_migrations.rb
umbrellio-sequel-plugins-0.14.0.187 lib/sequel/extensions/methods_in_migrations.rb
umbrellio-sequel-plugins-0.14.0 lib/sequel/extensions/methods_in_migrations.rb
umbrellio-sequel-plugins-0.13.0.185 lib/sequel/extensions/methods_in_migrations.rb
umbrellio-sequel-plugins-0.13.0.172 lib/sequel/extensions/methods_in_migrations.rb
umbrellio-sequel-plugins-0.13.0 lib/sequel/extensions/methods_in_migrations.rb
umbrellio-sequel-plugins-0.12.0.169 lib/sequel/extensions/methods_in_migrations.rb
umbrellio-sequel-plugins-0.12.0 lib/sequel/extensions/methods_in_migrations.rb