Skip to content

Commit 0ee48e1

Browse files
committed
fix: sequel migration 19 for mysql
Closes: pact-foundation#33
1 parent 9ae811c commit 0ee48e1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

db/migrations/19_make_pact_version_content_sha_not_nullable.rb

+9-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,17 @@
22
require_relative 'migration_helper'
33

44
Sequel.migration do
5-
change do
5+
up do
6+
PactBroker::MigrationHelper.with_mysql do
7+
run("SET FOREIGN_KEY_CHECKS = 0")
8+
end
9+
610
alter_table(:pacts) do
711
set_column_not_null(:pact_version_content_sha)
812
end
13+
14+
PactBroker::MigrationHelper.with_mysql do
15+
run("SET FOREIGN_KEY_CHECKS = 1")
16+
end
917
end
1018
end

0 commit comments

Comments
 (0)