Skip to content

Commit

Permalink
fix: sequel migration 19 for mysql
Browse files Browse the repository at this point in the history
Closes: #33
  • Loading branch information
bethesque committed Sep 7, 2017
1 parent 9ae811c commit 0ee48e1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion db/migrations/19_make_pact_version_content_sha_not_nullable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@
require_relative 'migration_helper'

Sequel.migration do
change do
up do
PactBroker::MigrationHelper.with_mysql do
run("SET FOREIGN_KEY_CHECKS = 0")
end

alter_table(:pacts) do
set_column_not_null(:pact_version_content_sha)
end

PactBroker::MigrationHelper.with_mysql do
run("SET FOREIGN_KEY_CHECKS = 1")
end
end
end

0 comments on commit 0ee48e1

Please sign in to comment.