Explain that autoIncrement and primaryKey are incompatible

This commit is contained in:
Simon Binder 2020-11-18 10:39:23 +01:00
parent a0821bd97a
commit 66a2cd0b09
No known key found for this signature in database
GPG Key ID: 7891917E4147B8C0
1 changed files with 3 additions and 0 deletions

View File

@ -176,6 +176,9 @@ class ColumnBuilder<Builder, ResultColumn extends Column<ResultDartType>,
class IntColumnBuilder extends ColumnBuilder<IntColumnBuilder, IntColumn, int> {
/// Enables auto-increment for this column, which will also make this column
/// 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();
}