Sha256: aef4688befd07f71c65b32053c58dff5dccafe968fd9d75a4f2ecef4628f32b3

Contents?: true

Size: 531 Bytes

Versions: 11

Compression:

Stored size: 531 Bytes

Contents

module PactBroker
  module DB
    class Version
      def self.call database_connection
        # if database_connection.tables.include?(:schema_migrations)
        #   last_migration_filename = database_connection[:schema_migrations].order(:filename).last[:filename]
        #   last_migration_filename.split(MIGRATION_SPLITTER, 2).first.to_i

        if database_connection.tables.include?(:schema_info)
          database_connection[:schema_info].first[:version]
        else
          0
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
pact_broker-2.7.0.beta.1 lib/pact_broker/db/version.rb
pact_broker-2.6.0 lib/pact_broker/db/version.rb
pact_broker-2.5.1 lib/pact_broker/db/version.rb
pact_broker-2.5.0 lib/pact_broker/db/version.rb
pact_broker-2.4.2 lib/pact_broker/db/version.rb
pact_broker-2.4.1 lib/pact_broker/db/version.rb
pact_broker-2.4.0 lib/pact_broker/db/version.rb
pact_broker-2.3.0 lib/pact_broker/db/version.rb
pact_broker-2.2.0 lib/pact_broker/db/version.rb
pact_broker-2.1.1 lib/pact_broker/db/version.rb
pact_broker-2.1.0 lib/pact_broker/db/version.rb