Skip to content

Commit

Permalink
bugfix: fixes issue with primary generated columns being invalid colu…
Browse files Browse the repository at this point in the history
…mn type (fixes typeorm#8532)
  • Loading branch information
simplenotezy committed Jun 21, 2022
1 parent f17af54 commit e00cdb0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/driver/cockroachdb/CockroachDriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,9 @@ export class CockroachDriver implements Driver {
isGenerated?: boolean
generationStrategy?: "increment" | "uuid" | "rowid"
}): string {
if (
if (column.generationStrategy === "rowid" && column.type === Number) {
return "bigint"
} else if (
column.type === Number ||
column.type === "integer" ||
column.type === "int" ||
Expand Down

0 comments on commit e00cdb0

Please sign in to comment.