Active Record PostgreSQL Adapter Alter Table
Methods
Attributes
[R]
|
constraint_validations |
|
[R]
|
exclusion_constraint_adds |
|
[R]
|
exclusion_constraint_drops |
|
[R]
|
unique_constraint_adds |
|
[R]
|
unique_constraint_drops |
|
Class Public methods
new(td)
📝 Source code
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 341
def initialize(td)
super
@constraint_validations = []
@exclusion_constraint_adds = []
@exclusion_constraint_drops = []
@unique_constraint_adds = []
@unique_constraint_drops = []
end
🔎 See on GitHub
Instance Public methods
add_exclusion_constraint(expression, options)
📝 Source code
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 354
def add_exclusion_constraint(expression, options)
@exclusion_constraint_adds << @td.new_exclusion_constraint_definition(expression, options)
end
🔎 See on GitHub
add_unique_constraint(column_name, options)
📝 Source code
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 362
def add_unique_constraint(column_name, options)
@unique_constraint_adds << @td.new_unique_constraint_definition(column_name, options)
end
🔎 See on GitHub
drop_exclusion_constraint(constraint_name)
📝 Source code
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 358
def drop_exclusion_constraint(constraint_name)
@exclusion_constraint_drops << constraint_name
end
🔎 See on GitHub
drop_unique_constraint(unique_constraint_name)
📝 Source code
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 366
def drop_unique_constraint(unique_constraint_name)
@unique_constraint_drops << unique_constraint_name
end
🔎 See on GitHub
validate_constraint(name)
📝 Source code
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 350
def validate_constraint(name)
@constraint_validations << name
end
🔎 See on GitHub