Skip to content

Commit

Permalink
fix: sequel migration 25 for mysql
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Sep 7, 2017
1 parent 0ee48e1 commit 920c363
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions db/migrations/25_make_pv_pacticipants_mandatory.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
Sequel.migration do
up do
PactBroker::MigrationHelper.with_mysql do
run("SET FOREIGN_KEY_CHECKS = 0")
end

alter_table(:pact_versions) do
set_column_not_null(:consumer_id)
set_column_not_null(:provider_id)
end

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

0 comments on commit 920c363

Please sign in to comment.