PrimaryGeneratedColumn
PrimaryGeneratedColumn Decorator
The PrimaryGeneratedColumn decorator is used to create a primary key with automatic value incrementing. It takes a PrimaryGeneratedColumnDecoratorInterface object as a parameter.
Parameters of PrimaryGeneratedColumnDecoratorInterface
type:
Type:
AutoIncrementColumnTypesPostgresType | AutoIncrementColumnTypesMysqlTypeDescription: The type of automatic increment value, depending on the database type.
startWith:
Type:
numberDescription: The starting value for auto-increment.
incrementBy:
Type:
numberDescription: The value by which the field increments for each new record.
minValue:
Type:
numberDescription: The minimum value for the field.
maxValue:
Type:
numberDescription: The maximum value for the field.
isCycle:
Type:
booleanDescription: Indicates whether the value will restart after reaching the maximum value.
cache:
Type:
numberDescription: Defines the number of values cached for faster auto-incrementing.
ownedBy:
Type:
stringDescription: Specifies which column owns the auto-increment.
restartWith:
Type:
numberDescription: The value at which auto-increment will restart (PostgreSQL only).
noOrder:
Type:
booleanDescription: Disables ordering of auto-increment values (PostgreSQL only).
Last updated