ForeignIdDefinition class final
A foreignId() column that can be constrained().
- Inheritance
-
- Object
- ColumnDefinition
- ForeignIdDefinition
Constructors
- ForeignIdDefinition(String name, ColumnType type, Blueprint _blueprint)
Properties
-
allowed
→ List<
String> -
Allowed values for ColumnType.enumeration.
finalinherited
- commentText → String?
-
no setterinherited
- defaultValue → Object?
-
no setterinherited
- hasDefault → bool
-
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasIndex → bool
-
no setterinherited
- isAutoIncrement → bool
-
no setterinherited
- isChange → bool
-
no setterinherited
- isNullable → bool
-
no setterinherited
- isPrimary → bool
-
no setterinherited
- isUnique → bool
-
no setterinherited
- isUnsigned → bool
-
no setterinherited
- length → int?
-
finalinherited
- name → String
-
finalinherited
- precision → int?
-
finalinherited
- rawDefault → String?
-
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scale → int?
-
finalinherited
- type → ColumnType
-
finalinherited
- usesCurrent → bool
-
no setterinherited
Methods
-
change(
) → ColumnDefinition -
Marks the column as a modification of an existing column
(
Schema.tableonly).inherited -
comment(
String text) → ColumnDefinition -
inherited
-
constrained(
[String? table, String column = 'id']) → ForeignKeyDefinition -
Adds a foreign key to
table(guessed from the column name:user_id→users) referencingcolumn. -
defaultRaw(
String expression) → ColumnDefinition -
Raw SQL default (
defaultRaw('CURRENT_TIMESTAMP')).inherited -
defaultTo(
Object? value) → ColumnDefinition -
inherited
-
index(
) → ColumnDefinition -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
nullable(
[bool value = true]) → ForeignIdDefinition -
override
-
primary(
) → ColumnDefinition -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
unique(
) → ColumnDefinition -
inherited
-
unsigned(
) → ColumnDefinition -
inherited
-
useCurrent(
) → ColumnDefinition -
DEFAULT CURRENT_TIMESTAMPfor timestamp columns.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
guessTable(
String column) → String -
user_id→users,category_id→categories.