Class: CreateIpTimezones
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateIpTimezones
- Defined in:
- lib/generators/timezone_detection/migrations/ip_timezone.rb
Instance Method Summary collapse
Instance Method Details
#change ⇒ Object
2 3 4 5 6 7 8 9 |
# File 'lib/generators/timezone_detection/migrations/ip_timezone.rb', line 2 def change create_table :timezone_detection_ip_timezones do |t| t.column :ip_in_longint, "INT UNSIGNED", default: 0 t.integer :utc_offset end add_index :timezone_detection_ip_timezones , :ip_in_longint end |