class CreateIpAddressRoles < ActiveRecord::Migration[7.2]
  def change
    create_table :ip_address_roles do |t|
      t.inet :ip_address, null: false
      t.string :role, null: false, default: "user"
      t.string :description
      t.boolean :active, null: false, default: true
      t.timestamps
    end

    add_index :ip_address_roles, :ip_address, unique: true
  end
end
