Class: DatabaseConsistency::Writers::AutofixWriter
- Inherits:
-
BaseWriter
- Object
- BaseWriter
- DatabaseConsistency::Writers::AutofixWriter
- Defined in:
- lib/database_consistency/writers/autofix_writer.rb
Overview
The simplest formatter
Constant Summary collapse
- SLUG_TO_GENERATOR =
{ association_missing_index: Autofix::AssociationMissingIndex, association_missing_null_constraint: Autofix::NullConstraintMissing, association_foreign_type_missing_null_constraint: Autofix::NullConstraintMissing, has_one_missing_unique_index: Autofix::HasOneMissingUniqueIndex, inconsistent_types: Autofix::InconsistentTypes, missing_foreign_key: Autofix::MissingForeignKey, missing_unique_index: Autofix::HasOneMissingUniqueIndex, null_constraint_missing: Autofix::NullConstraintMissing, redundant_index: Autofix::RedundantIndex, redundant_unique_index: Autofix::RedundantIndex, small_primary_key: Autofix::InconsistentTypes, three_state_boolean: Autofix::NullConstraintMissing }.freeze
Instance Attribute Summary
Attributes inherited from BaseWriter
Instance Method Summary collapse
Methods inherited from BaseWriter
Constructor Details
This class inherits a constructor from DatabaseConsistency::Writers::BaseWriter
Instance Method Details
#write ⇒ Object
23 24 25 |
# File 'lib/database_consistency/writers/autofix_writer.rb', line 23 def write unique_generators.each(&:fix!) end |