mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 04:59:22 -06:00
19 lines
411 B
Ruby
19 lines
411 B
Ruby
# frozen_string_literal: true
|
|
|
|
class CreateUserIpAddressHistories < ActiveRecord::Migration[6.0]
|
|
def up
|
|
create_table :user_ip_address_histories do |t|
|
|
t.integer :user_id, null: false
|
|
t.inet :ip_address, null: false
|
|
|
|
t.timestamps
|
|
end
|
|
|
|
add_index :user_ip_address_histories, %i[user_id ip_address], unique: true
|
|
end
|
|
|
|
def down
|
|
drop_table :user_ip_address_histories
|
|
end
|
|
end
|