-
-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: default allow_dangerous_contract_modification to false for new …
…installations
- Loading branch information
Showing
5 changed files
with
31 additions
and
3 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
.../20220622_default_allow_dangerous_contract_modification_to_false_for_new_installations.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
require_relative "migration_helper" | ||
include PactBroker::MigrationHelper | ||
|
||
Sequel.migration do | ||
up do | ||
# Need to do this again because didn't actually set default of allow_dangerous_contract_modification to true | ||
# when the first migration was run in db/migrations/20210810_set_allow_contract_modification.rb | ||
for_upgrades_of_existing_installations do | ||
from(:config).insert_ignore.insert( | ||
name: "allow_dangerous_contract_modification", | ||
type: "boolean", | ||
value: "1", | ||
created_at: Sequel.datetime_class.now, | ||
updated_at: Sequel.datetime_class.now | ||
) | ||
end | ||
end | ||
|
||
down do | ||
|
||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters