Class: ActiveRecord::ConnectionAdapters::PostgreSQL::AlterTable
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
|
|
Instance Chain:
|
|
Inherits: |
ActiveRecord::ConnectionAdapters::AlterTable
|
Defined in: | activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb |
Overview
Active Record PostgreSQL Adapter Alter Table
Class Method Summary
Instance Attribute Summary
- #constraint_validations readonly
- #exclusion_constraint_adds readonly
- #exclusion_constraint_drops readonly
- #unique_constraint_adds readonly
- #unique_constraint_drops readonly
::ActiveRecord::ConnectionAdapters::AlterTable
- Inherited
Instance Method Summary
- #add_exclusion_constraint(expression, options)
- #add_unique_constraint(column_name, options)
- #drop_exclusion_constraint(constraint_name)
- #drop_unique_constraint(unique_constraint_name)
- #validate_constraint(name)
::ActiveRecord::ConnectionAdapters::AlterTable
- Inherited
Constructor Details
.new(td) ⇒ AlterTable
# File 'activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 363
def initialize(td) super @constraint_validations = [] @exclusion_constraint_adds = [] @exclusion_constraint_drops = [] @unique_constraint_adds = [] @unique_constraint_drops = [] end
Instance Attribute Details
#constraint_validations (readonly)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 361
attr_reader :constraint_validations, :exclusion_constraint_adds, :exclusion_constraint_drops, :unique_constraint_adds, :unique_constraint_drops
#exclusion_constraint_adds (readonly)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 361
attr_reader :constraint_validations, :exclusion_constraint_adds, :exclusion_constraint_drops, :unique_constraint_adds, :unique_constraint_drops
#exclusion_constraint_drops (readonly)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 361
attr_reader :constraint_validations, :exclusion_constraint_adds, :exclusion_constraint_drops, :unique_constraint_adds, :unique_constraint_drops
#unique_constraint_adds (readonly)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 361
attr_reader :constraint_validations, :exclusion_constraint_adds, :exclusion_constraint_drops, :unique_constraint_adds, :unique_constraint_drops
#unique_constraint_drops (readonly)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 361
attr_reader :constraint_validations, :exclusion_constraint_adds, :exclusion_constraint_drops, :unique_constraint_adds, :unique_constraint_drops
Instance Method Details
#add_exclusion_constraint(expression, options)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 376
def add_exclusion_constraint(expression, ) @exclusion_constraint_adds << @td.new_exclusion_constraint_definition(expression, ) end
#add_unique_constraint(column_name, options)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 384
def add_unique_constraint(column_name, ) @unique_constraint_adds << @td.new_unique_constraint_definition(column_name, ) end
#drop_exclusion_constraint(constraint_name)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 380
def drop_exclusion_constraint(constraint_name) @exclusion_constraint_drops << constraint_name end
#drop_unique_constraint(unique_constraint_name)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 388
def drop_unique_constraint(unique_constraint_name) @unique_constraint_drops << unique_constraint_name end
#validate_constraint(name)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 372
def validate_constraint(name) @constraint_validations << name end