DEV: annotate models (#11047)

This commit is contained in:
Arpit Jalan
2020-10-27 23:42:33 +05:30
committed by GitHub
parent 35cfca1f3f
commit c6bf70c870
17 changed files with 56 additions and 33 deletions

View File

@@ -6,3 +6,18 @@ class UserIpAddressHistory < ActiveRecord::Base
validates :user_id, presence: true
validates :ip_address, presence: true, uniqueness: { scope: :user_id }
end
# == Schema Information
#
# Table name: user_ip_address_histories
#
# id :bigint not null, primary key
# user_id :integer not null
# ip_address :inet not null
# created_at :datetime not null
# updated_at :datetime not null
#
# Indexes
#
# index_user_ip_address_histories_on_user_id_and_ip_address (user_id,ip_address) UNIQUE
#