1

I'm trying to build a migration which would include an IP Address as a zero-filled unsigned integer.

My migration looks something like this currently but zerofill: true is not working

up do
  create table :ip do
    Integer :id, size: 7, default: nil
    Integer :ip_address_integer, size: 10, unsigned: true, zerofill: true
    varchar :scan_time, size: 32
    primary_key :id
  end
end

How would I make the IP address zero filled using the sequel ORM

kkirsche
  • 1,217
  • 2
  • 15
  • 38

1 Answers1

2

Sequel does not support a :zerofill argument for defining columns. You may want to just specify the type directly using something like:

column :ip_address_integer, 'integer(10) unsigned zerofill'
Jeremy Evans
  • 11,959
  • 27
  • 26