We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ee4c31d commit db8fbf0Copy full SHA for db8fbf0
migrator.go
@@ -39,7 +39,7 @@ func (m Migrator) FullDataTypeOf(field *schema.Field) clause.Expr {
39
if field.PrimaryKey {
40
// DuckDB doesn't support native AUTO_INCREMENT, so we use sequences to emulate this behavior for auto-increment primary keys
41
// Check if this is an auto-increment field (no default value specified)
42
- if field.AutoIncrement || (!field.HasDefaultValue && field.DataType == schema.Uint) {
+ if m.isAutoIncrementField(field) {
43
// Use BIGINT with a default sequence value
44
expr.SQL = "BIGINT DEFAULT nextval('seq_" + strings.ToLower(field.Schema.Table) + "_" + strings.ToLower(field.DBName) + "')"
45
} else {
0 commit comments