Class: DatabaseConsistency::Checkers::ForeignKeyTypeChecker

Inherits:
AssociationChecker show all
Defined in:
lib/database_consistency/checkers/association_checkers/foreign_key_type_checker.rb

Overview

This class checks if association’s foreign key type covers associated model’s primary key (same or bigger)

Constant Summary collapse

INCONSISTENT_TYPE =
"foreign key (%a_f) with type (%a_t) doesn't cover primary key (%b_f) with type (%b_t)"

Instance Attribute Summary

Attributes inherited from AssociationChecker

#association, #model

Method Summary

Methods inherited from AssociationChecker

#column_or_attribute_name, #initialize, #table_or_model_name

Methods inherited from BaseChecker

checker_name, enabled?, #enabled?, #report, #report_if_enabled?

Constructor Details

This class inherits a constructor from DatabaseConsistency::Checkers::AssociationChecker