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.36.1 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb
pact_broker-2.36.0 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb
pact_broker-2.35.0 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb
pact_broker-2.34.0 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb
pact_broker-2.33.0 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb
pact_broker-2.32.0 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb
pact_broker-2.31.0 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb
pact_broker-2.30.0 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb
pact_broker-2.29.0 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb
pact_broker-2.27.6 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb
pact_broker-2.27.5 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb
pact_broker-2.27.4 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb
pact_broker-2.27.3 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb
pact_broker-2.27.2 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb
pact_broker-2.27.0 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb
pact_broker-2.26.1 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb
pact_broker-2.26.0 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb
pact_broker-2.25.0 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb
pact_broker-2.24.0 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb
pact_broker-2.23.4 db/migrations/000016_add_pact_content_foreign_key_to_pacts.rb