mirror of https://github.com/AMT-Cheif/drift.git
Explain that autoIncrement and primaryKey are incompatible
This commit is contained in:
parent
a0821bd97a
commit
66a2cd0b09
|
@ -176,6 +176,9 @@ class ColumnBuilder<Builder, ResultColumn extends Column<ResultDartType>,
|
||||||
class IntColumnBuilder extends ColumnBuilder<IntColumnBuilder, IntColumn, int> {
|
class IntColumnBuilder extends ColumnBuilder<IntColumnBuilder, IntColumn, int> {
|
||||||
/// Enables auto-increment for this column, which will also make this column
|
/// Enables auto-increment for this column, which will also make this column
|
||||||
/// the primary key of the table.
|
/// the primary key of the table.
|
||||||
|
///
|
||||||
|
/// For this reason, you can't use an [autoIncrement] column and also set a
|
||||||
|
/// custom [Table.primaryKey] on the same table.
|
||||||
IntColumnBuilder autoIncrement() => _isGenerated();
|
IntColumnBuilder autoIncrement() => _isGenerated();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue