Class: ActiveRecord::ConnectionAdapters::CipherStashPG::AlterTable
- Inherits:
-
AlterTable
- Object
- AlterTable
- ActiveRecord::ConnectionAdapters::CipherStashPG::AlterTable
- Defined in:
- lib/active_record/connection_adapters/7.1/cipherstash_pg/schema_definitions.rb,
lib/active_record/connection_adapters/6.1/cipherstash_pg/schema_definitions.rb,
lib/active_record/connection_adapters/7.0/cipherstash_pg/schema_definitions.rb
Overview
Active Record PostgreSQL Adapter Alter Table
Instance Attribute Summary collapse
-
#constraint_validations ⇒ Object
readonly
Returns the value of attribute constraint_validations.
-
#exclusion_constraint_adds ⇒ Object
readonly
Returns the value of attribute exclusion_constraint_adds.
-
#exclusion_constraint_drops ⇒ Object
readonly
Returns the value of attribute exclusion_constraint_drops.
-
#unique_key_adds ⇒ Object
readonly
Returns the value of attribute unique_key_adds.
-
#unique_key_drops ⇒ Object
readonly
Returns the value of attribute unique_key_drops.
Instance Method Summary collapse
- #add_exclusion_constraint(expression, options) ⇒ Object
- #add_unique_key(column_name, options) ⇒ Object
- #drop_exclusion_constraint(constraint_name) ⇒ Object
- #drop_unique_key(unique_key_name) ⇒ Object
-
#initialize(td) ⇒ AlterTable
constructor
A new instance of AlterTable.
- #validate_constraint(name) ⇒ Object
Constructor Details
#initialize(td) ⇒ AlterTable
Returns a new instance of AlterTable.
211 212 213 214 |
# File 'lib/active_record/connection_adapters/6.1/cipherstash_pg/schema_definitions.rb', line 211 def initialize(td) super @constraint_validations = [] end |
Instance Attribute Details
#constraint_validations ⇒ Object (readonly)
Returns the value of attribute constraint_validations.
209 210 211 |
# File 'lib/active_record/connection_adapters/6.1/cipherstash_pg/schema_definitions.rb', line 209 def constraint_validations @constraint_validations end |
#exclusion_constraint_adds ⇒ Object (readonly)
Returns the value of attribute exclusion_constraint_adds.
339 340 341 |
# File 'lib/active_record/connection_adapters/7.1/cipherstash_pg/schema_definitions.rb', line 339 def exclusion_constraint_adds @exclusion_constraint_adds end |
#exclusion_constraint_drops ⇒ Object (readonly)
Returns the value of attribute exclusion_constraint_drops.
339 340 341 |
# File 'lib/active_record/connection_adapters/7.1/cipherstash_pg/schema_definitions.rb', line 339 def exclusion_constraint_drops @exclusion_constraint_drops end |
#unique_key_adds ⇒ Object (readonly)
Returns the value of attribute unique_key_adds.
339 340 341 |
# File 'lib/active_record/connection_adapters/7.1/cipherstash_pg/schema_definitions.rb', line 339 def unique_key_adds @unique_key_adds end |
#unique_key_drops ⇒ Object (readonly)
Returns the value of attribute unique_key_drops.
339 340 341 |
# File 'lib/active_record/connection_adapters/7.1/cipherstash_pg/schema_definitions.rb', line 339 def unique_key_drops @unique_key_drops end |
Instance Method Details
#add_exclusion_constraint(expression, options) ⇒ Object
354 355 356 |
# File 'lib/active_record/connection_adapters/7.1/cipherstash_pg/schema_definitions.rb', line 354 def add_exclusion_constraint(expression, ) @exclusion_constraint_adds << @td.new_exclusion_constraint_definition(expression, ) end |
#add_unique_key(column_name, options) ⇒ Object
362 363 364 |
# File 'lib/active_record/connection_adapters/7.1/cipherstash_pg/schema_definitions.rb', line 362 def add_unique_key(column_name, ) @unique_key_adds << @td.new_unique_key_definition(column_name, ) end |
#drop_exclusion_constraint(constraint_name) ⇒ Object
358 359 360 |
# File 'lib/active_record/connection_adapters/7.1/cipherstash_pg/schema_definitions.rb', line 358 def drop_exclusion_constraint(constraint_name) @exclusion_constraint_drops << constraint_name end |
#drop_unique_key(unique_key_name) ⇒ Object
366 367 368 |
# File 'lib/active_record/connection_adapters/7.1/cipherstash_pg/schema_definitions.rb', line 366 def drop_unique_key(unique_key_name) @unique_key_drops << unique_key_name end |
#validate_constraint(name) ⇒ Object
216 217 218 |
# File 'lib/active_record/connection_adapters/6.1/cipherstash_pg/schema_definitions.rb', line 216 def validate_constraint(name) @constraint_validations << name end |