1 # frozen_string_literal: true
 
   3 # == Schema Information
 
   5 # Table name: changeset_tags
 
   7 #  changeset_id :bigint           not null, primary key
 
   8 #  k            :string           default(""), not null, primary key
 
   9 #  v            :string           default(""), not null
 
  13 #  changeset_tags_id_fkey  (changeset_id => changesets.id)
 
  16 class ChangesetTag < ApplicationRecord
 
  19   validates :changeset, :associated => true
 
  20   validates :k, :v, :allow_blank => true, :length => { :maximum => 255 }, :characters => true
 
  21   validates :k, :uniqueness => { :scope => :changeset_id }