Sha256: 5999b422734abf6af454b190ae80ae2dfdb01890f62682d7019aae3ddb62eb1d

Contents?: true

Size: 503 Bytes

Versions: 158

Compression:

Stored size: 503 Bytes

Contents

require 'digest/sha1'
require_relative 'migration_helper'

Sequel.migration do
  change do

    PactBroker::MigrationHelper.with_mysql do
      # Needed to make FK pact_version_content_sha match encoding of pact_version_content ID
      run("ALTER TABLE pacts CONVERT TO CHARACTER SET 'utf8';")
    end

    alter_table(:pacts) do
      add_foreign_key :pact_version_content_sha, :pact_version_contents, type: String, null: true, foreign_key_constraint_name: 'fk_pact_version_content'
    end
  end
end

Version data entries

158 entries across 158 versions & 1 rubygems

Version Path
pact_broker-2.79.1 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb
pact_broker-2.79.0 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb
pact_broker-2.78.1 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb
pact_broker-2.78.0 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb
pact_broker-2.77.0 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb
pact_broker-2.76.2 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb
pact_broker-2.76.1 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb
pact_broker-2.76.0 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb
pact_broker-2.75.0 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb
pact_broker-2.74.1 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb
pact_broker-2.74.0 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb
pact_broker-2.73.0 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb
pact_broker-2.72.0 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb
pact_broker-2.71.0 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb
pact_broker-2.70.0 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb
pact_broker-2.69.0 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb
pact_broker-2.68.1 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb
pact_broker-2.68.0 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb
pact_broker-2.67.0 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb
pact_broker-2.66.0 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb