Sha256: c29207e4b5ece9d7d6d7f49d496cb5ab76fec33dd9f97a4794bf6908d3d4c881

Contents?: true

Size: 1.92 KB

Versions: 25

Compression:

Stored size: 1.92 KB

Contents

Dir.glob(File.expand_path(File.join(__FILE__, "..", "data_migrations", "*.rb"))).sort.each do | path |
  require path
end

# Data migrations run *every* time the broker starts up, after the schema migrations.
# Their purpose is to ensure that data integrity is maintained during rolling migrations
# in architectures with multiple application instances running against the same
# database (eg. EC2 autoscaling group) where "old" data might be inserted by
# the application instance running the previous version of the code AFTER
# the schema migrations have been run on the first application instance with the
# new version of the code.

module PactBroker
  module DB
    class MigrateData
      def self.call database_connection, _options = {}
        DataMigrations::SetPacticipantIdsForVerifications.call(database_connection)
        DataMigrations::SetConsumerIdsForPactPublications.call(database_connection)
        DataMigrations::SetLatestVersionSequenceValue.call(database_connection)
        DataMigrations::SetWebhooksEnabled.call(database_connection)
        DataMigrations::DeleteDeprecatedWebhookExecutions.call(database_connection)
        DataMigrations::SetCreatedAtForLatestPactPublications.call(database_connection)
        DataMigrations::SetCreatedAtForLatestVerifications.call(database_connection)
        DataMigrations::SetExtraColumnsForTags.call(database_connection)
        DataMigrations::SetPacticipantDisplayName.call(database_connection)
        DataMigrations::SetWebhookUuid.call(database_connection)
        DataMigrations::SetConsumerVersionOrderForPactPublications.call(database_connection)
        DataMigrations::SetExtraColumnsForTags.call(database_connection)
        DataMigrations::CreateBranches.call(database_connection)
        DataMigrations::MigrateIntegrations.call(database_connection)
        DataMigrations::MigratePactVersionProviderTagSuccessfulVerifications.call(database_connection)
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
pact_broker-2.107.1 lib/pact_broker/db/migrate_data.rb
pact_broker-2.107.0 lib/pact_broker/db/migrate_data.rb
pact_broker-2.107.0.beta.1 lib/pact_broker/db/migrate_data.rb
pact_broker-2.106.0 lib/pact_broker/db/migrate_data.rb
pact_broker-2.105.0 lib/pact_broker/db/migrate_data.rb
pact_broker-2.104.0 lib/pact_broker/db/migrate_data.rb
pact_broker-2.103.0 lib/pact_broker/db/migrate_data.rb
pact_broker-2.102.2 lib/pact_broker/db/migrate_data.rb
pact_broker-2.102.1 lib/pact_broker/db/migrate_data.rb
pact_broker-2.102.0 lib/pact_broker/db/migrate_data.rb
pact_broker-2.101.0 lib/pact_broker/db/migrate_data.rb
pact_broker-2.100.0 lib/pact_broker/db/migrate_data.rb
pact_broker-2.99.0 lib/pact_broker/db/migrate_data.rb
pact_broker-2.98.0 lib/pact_broker/db/migrate_data.rb
pact_broker-2.97.0 lib/pact_broker/db/migrate_data.rb
pact_broker-2.96.0 lib/pact_broker/db/migrate_data.rb
pact_broker-2.95.1 lib/pact_broker/db/migrate_data.rb
pact_broker-2.95.0 lib/pact_broker/db/migrate_data.rb
pact_broker-2.94.0 lib/pact_broker/db/migrate_data.rb
pact_broker-2.93.4 lib/pact_broker/db/migrate_data.rb