mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 19:00:32 -06:00
30990006a9
This reduces chances of errors where consumers of strings mutate inputs and reduces memory usage of the app. Test suite passes now, but there may be some stuff left, so we will run a few sites on a branch prior to merging
31 lines
1002 B
Ruby
31 lines
1002 B
Ruby
# frozen_string_literal: true
|
|
|
|
class SingleSignOnRecord < ActiveRecord::Base
|
|
belongs_to :user
|
|
|
|
validates :external_id, uniqueness: true
|
|
end
|
|
|
|
# == Schema Information
|
|
#
|
|
# Table name: single_sign_on_records
|
|
#
|
|
# id :integer not null, primary key
|
|
# user_id :integer not null
|
|
# external_id :string not null
|
|
# last_payload :text not null
|
|
# created_at :datetime not null
|
|
# updated_at :datetime not null
|
|
# external_username :string
|
|
# external_email :string
|
|
# external_name :string
|
|
# external_avatar_url :string(1000)
|
|
# external_profile_background_url :string
|
|
# external_card_background_url :string
|
|
#
|
|
# Indexes
|
|
#
|
|
# index_single_sign_on_records_on_external_id (external_id) UNIQUE
|
|
# index_single_sign_on_records_on_user_id (user_id)
|
|
#
|