X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/24b138db094e4b5e8d062c5248ee867967dc0fd7..9fc2a5c4e9c2d0bc7df5493b5b74345992aa9dfa:/db/migrate/20120208122334_merge_acl_address_and_mask.rb diff --git a/db/migrate/20120208122334_merge_acl_address_and_mask.rb b/db/migrate/20120208122334_merge_acl_address_and_mask.rb index 48cdbbc2a..5cac10740 100644 --- a/db/migrate/20120208122334_merge_acl_address_and_mask.rb +++ b/db/migrate/20120208122334_merge_acl_address_and_mask.rb @@ -11,6 +11,9 @@ class IPAddr end class MergeAclAddressAndMask < ActiveRecord::Migration[4.2] + class Acl < ApplicationRecord + end + def up Acl.find_each do |acl| address = IPAddr.new(acl.address) @@ -18,7 +21,7 @@ class MergeAclAddressAndMask < ActiveRecord::Migration[4.2] prefix = 0 while netmask != "0.0.0.0" - netmask = netmask << 1 + netmask <<= 1 prefix += 1 end