# == Schema Information
#
# Table name: public_key
#
#  id              :integer          not null, primary key
#  owner_id        :integer          not null
#  name            :string(255)      not null
#  fingerprint     :string(255)      not null
#  content         :text(16777215)   not null
#  mode            :integer          default("2"), not null
#  type            :integer          default("1"), not null
#  login_source_id :integer          default("0"), not null
#  created_unix    :integer
#  updated_unix    :integer
#  verified        :boolean          default("0"), not null
#
# Indexes
#
#  IDX_public_key_fingerprint  (fingerprint)
#  IDX_public_key_owner_id     (owner_id)
#

class Gitea::PublicKey < Gitea::Base
  self.inheritance_column = nil # FIX  The single-table inheritance mechanism failed
  # establish_connection :gitea_db
  
  self.table_name = "public_key"

  belongs_to :user, class_name: '::User', primary_key: :gitea_uid, foreign_key: :owner_id, optional: true

end
