Skip to content

Commit

Permalink
Make sure SqlType.BIGINT gets an autoincrement in MySQL.
Browse files Browse the repository at this point in the history
  • Loading branch information
vnayar committed Dec 16, 2024
1 parent d2ba312 commit 3968258
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/hibernated/dialects/mysqldialect.d
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class MySQLDialect : Dialect {
string pk = !fk && pi.key ? " PRIMARY KEY" : "";
// MySQL only supports AUTO_INCREMENT for integer types of PRIMARY KEY or UNIQUE.
string autoinc = (!fk && pi.generated)
? (sqlType == SqlType.INTEGER
? (sqlType == SqlType.INTEGER || sqlType == SqlType.BIGINT
? (pi.key
? " AUTO_INCREMENT"
: " AUTO_INCREMENT UNIQUE")
Expand Down

0 comments on commit 3968258

Please sign in to comment.