Marten::DB::Management::Constraint::Unique
Inherits Marten::DB::CanFormatStringsOrSymbols / Reference / Object
Represents a unique constraint used when creating or altering tables.
Constructors
from(unique_constraint : DB::Constraint::Unique) : Unique
Returns a management unique constraint from a unique constraint definition.
Instance methods
==(other : self)
Returns true if the other unique constraint corresponds to the same unique constraint configuration.
serialize_args
Returns a serialized version of the unique constraint arguments to be used when generating migrations.
The returned string will be used in the context of add_unique_constraint / unique_constraint statements
in generated migrations.