[chore]: Bump github.com/uptrace/bun/extra/bunotel from 1.2.1 to 1.2.5

Bumps [github.com/uptrace/bun/extra/bunotel](https://github.com/uptrace/bun) from 1.2.1 to 1.2.5.
- [Release notes](https://github.com/uptrace/bun/releases)
- [Changelog](https://github.com/uptrace/bun/blob/master/CHANGELOG.md)
- [Commits](https://github.com/uptrace/bun/compare/v1.2.1...v1.2.5)

---
updated-dependencies:
- dependency-name: github.com/uptrace/bun/extra/bunotel
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
dependabot[bot] 2024-11-04 06:45:50 +00:00 committed by GitHub
commit 362afe8da3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
67 changed files with 3561 additions and 506 deletions

View file

@ -9,6 +9,7 @@ import (
"strconv"
"strings"
"github.com/uptrace/bun/dialect"
"github.com/uptrace/bun/dialect/feature"
"github.com/uptrace/bun/dialect/sqltype"
"github.com/uptrace/bun/internal"
@ -165,7 +166,7 @@ func (q *CreateTableQuery) AppendQuery(fmter schema.Formatter, b []byte) (_ []by
b = append(b, field.SQLName...)
b = append(b, " "...)
b = q.appendSQLType(b, field)
if field.NotNull {
if field.NotNull && q.db.dialect.Name() != dialect.Oracle {
b = append(b, " NOT NULL"...)
}
@ -246,7 +247,11 @@ func (q *CreateTableQuery) appendSQLType(b []byte, field *schema.Field) []byte {
return append(b, field.CreateTableSQLType...)
}
b = append(b, sqltype.VarChar...)
if q.db.dialect.Name() == dialect.Oracle {
b = append(b, "VARCHAR2"...)
} else {
b = append(b, sqltype.VarChar...)
}
b = append(b, "("...)
b = strconv.AppendInt(b, int64(q.varchar), 10)
b = append(b, ")"...)
@ -297,9 +302,9 @@ func (q *CreateTableQuery) appendFKConstraintsRel(fmter schema.Formatter, b []by
b, err = q.appendFK(fmter, b, schema.QueryWithArgs{
Query: "(?) REFERENCES ? (?) ? ?",
Args: []interface{}{
Safe(appendColumns(nil, "", rel.BaseFields)),
Safe(appendColumns(nil, "", rel.BasePKs)),
rel.JoinTable.SQLName,
Safe(appendColumns(nil, "", rel.JoinFields)),
Safe(appendColumns(nil, "", rel.JoinPKs)),
Safe(rel.OnUpdate),
Safe(rel.OnDelete),
},