Class: ActiveRecord::ConnectionAdapters::PostgreSQL::AlterTable
- Inherits:
-
AlterTable
- Object
- AlterTable
- ActiveRecord::ConnectionAdapters::PostgreSQL::AlterTable
- Defined in:
- lib/active_record/connection_adapters/postgresql/schema_definitions.rb
Instance Attribute Summary collapse
-
#constraint_validations ⇒ Object
readonly
Returns the value of attribute constraint_validations.
Attributes inherited from AlterTable
#adds, #check_constraint_adds, #check_constraint_drops, #foreign_key_adds, #foreign_key_drops
Instance Method Summary collapse
-
#initialize(td) ⇒ AlterTable
constructor
A new instance of AlterTable.
- #validate_constraint(name) ⇒ Object
Methods inherited from AlterTable
#add_check_constraint, #add_column, #add_foreign_key, #drop_check_constraint, #drop_foreign_key, #name
Constructor Details
#initialize(td) ⇒ AlterTable
Returns a new instance of AlterTable.
232 233 234 235 |
# File 'lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 232 def initialize(td) super @constraint_validations = [] end |
Instance Attribute Details
#constraint_validations ⇒ Object (readonly)
Returns the value of attribute constraint_validations.
230 231 232 |
# File 'lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 230 def constraint_validations @constraint_validations end |
Instance Method Details
#validate_constraint(name) ⇒ Object
237 238 239 |
# File 'lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 237 def validate_constraint(name) @constraint_validations << name end |