Created
August 1, 2014 14:28
-
-
Save GregSutcliffe/40307c38f752a4be22e9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| diff --git a/db/migrate/20140626204657_add_unlimited_to_activation_keys.rb b/db/migrate/20140626204657_add_unlimited_to_activation_keys.rb | |
| index c24252b..1ef0ffb 100644 | |
| --- a/db/migrate/20140626204657_add_unlimited_to_activation_keys.rb | |
| +++ b/db/migrate/20140626204657_add_unlimited_to_activation_keys.rb | |
| @@ -5,18 +5,18 @@ class AddUnlimitedToActivationKeys < ActiveRecord::Migration | |
| change_column_default :katello_activation_keys, :max_content_hosts, nil | |
| update "UPDATE katello_activation_keys | |
| - SET unlimited_content_hosts = true, max_content_hosts = null | |
| + SET unlimited_content_hosts = 1, max_content_hosts = null | |
| WHERE max_content_hosts = -1" | |
| update "UPDATE katello_activation_keys | |
| - SET unlimited_content_hosts = false | |
| + SET unlimited_content_hosts = 0 | |
| WHERE max_content_hosts > 0" | |
| end | |
| def down | |
| update "UPDATE katello_activation_keys | |
| SET max_content_hosts = -1 | |
| - WHERE unlimited_content_hosts = true" | |
| + WHERE unlimited_content_hosts = 1" | |
| remove_column :katello_activation_keys, :unlimited_content_hosts | |
| rename_column :katello_activation_keys, :max_content_hosts, :usage_limit | |
| diff --git a/db/migrate/20140626204902_add_unlimited_to_host_collection.rb b/db/migrate/20140626204902_add_unlimited_to_host_collection.rb | |
| index d5c42b5..b232294 100644 | |
| --- a/db/migrate/20140626204902_add_unlimited_to_host_collection.rb | |
| +++ b/db/migrate/20140626204902_add_unlimited_to_host_collection.rb | |
| @@ -4,18 +4,18 @@ class AddUnlimitedToHostCollection < ActiveRecord::Migration | |
| change_column :katello_host_collections, :max_content_hosts, :integer, :null => true, :default => nil | |
| update "UPDATE katello_host_collections | |
| - SET unlimited_content_hosts = true, max_content_hosts = null | |
| + SET unlimited_content_hosts = 1, max_content_hosts = null | |
| WHERE max_content_hosts = -1" | |
| update "UPDATE katello_host_collections | |
| - SET unlimited_content_hosts = false | |
| + SET unlimited_content_hosts = 0 | |
| WHERE max_content_hosts > 0" | |
| end | |
| def down | |
| update "UPDATE katello_host_collections | |
| SET max_content_hosts = -1 | |
| - WHERE unlimited_content_hosts = true" | |
| + WHERE unlimited_content_hosts = 1" | |
| remove_column :katello_host_collections, :unlimited_content_hosts | |
| change_column :katello_host_collections, :max_content_hosts, :integer, :null => false, :default => -1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment