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.12.0.159 lib/sequel/extensions/methods_in_migrations.rb
umbrellio-sequel-plugins-0.11.0.143 lib/sequel/extensions/methods_in_migrations.rb
umbrellio-sequel-plugins-0.10.0.101 lib/sequel/extensions/methods_in_migrations.rb
umbrellio-sequel-plugins-0.10.0.100 lib/sequel/extensions/methods_in_migrations.rb
umbrellio-sequel-plugins-0.10.0.86 lib/sequel/extensions/methods_in_migrations.rb
umbrellio-sequel-plugins-0.9.0.79 lib/sequel/extensions/methods_in_migrations.rb
umbrellio-sequel-plugins-0.9.0.76 lib/sequel/extensions/methods_in_migrations.rb
umbrellio-sequel-plugins-0.8.0.73 lib/sequel/extensions/methods_in_migrations.rb
umbrellio-sequel-plugins-0.7.0.52 lib/sequel/extensions/methods_in_migrations.rb
umbrellio-sequel-plugins-0.6.0.46 lib/sequel/extensions/methods_in_migrations.rb
umbrellio-sequel-plugins-0.6.0 lib/sequel/extensions/methods_in_migrations.rb
umbrellio-sequel-plugins-0.6.0.36 lib/sequel/extensions/methods_in_migrations.rb
umbrellio-sequel-plugins-0.5.1.27 lib/sequel/extensions/methods_in_migrations.rb
umbrellio-sequel-plugins-0.5.1.26 lib/sequel/extensions/methods_in_migrations.rb
umbrellio-sequel-plugins-0.5.1.25 lib/sequel/extensions/methods_in_migrations.rb
umbrellio-sequel-plugins-0.5.1.18 lib/sequel/extensions/methods_in_migrations.rb
umbrellio-sequel-plugins-0.5.1.17 lib/sequel/extensions/methods_in_migrations.rb
umbrellio-sequel-plugins-0.5.1 lib/sequel/extensions/methods_in_migrations.rb
umbrellio-sequel-plugins-0.5.0 lib/sequel/extensions/methods_in_migrations.rb
umbrellio-sequel-plugins-0.4.0.164 lib/sequel/extensions/methods_in_migrations.rb