mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-24 04:07:47 +00:00
If the user would forget the PrimaryKeyDefinition, the primary was not defined:
try db.create(table: "membership") { t in
// WRONG: pk is unused
t.primaryKey { pk in
t.column("playerId", .integer)
t.column("teamId", .text)
}
}
The fix is to remove the PrimaryKeyDefinition:
try db.create(table: "membership") { t in
t.primaryKey {
t.column("playerId", .integer)
t.column("teamId", .text)
}
}