Upgrade xorm to v1.1.0 (#15869)
This commit is contained in:
parent
e2f39c2b64
commit
f6be429781
55 changed files with 1309 additions and 438 deletions
13
vendor/xorm.io/xorm/dialects/postgres.go
generated
vendored
13
vendor/xorm.io/xorm/dialects/postgres.go
generated
vendored
|
@ -824,6 +824,11 @@ func (db *postgres) SetQuotePolicy(quotePolicy QuotePolicy) {
|
|||
}
|
||||
}
|
||||
|
||||
// FormatBytes formats bytes
|
||||
func (db *postgres) FormatBytes(bs []byte) string {
|
||||
return fmt.Sprintf("E'\\x%x'", bs)
|
||||
}
|
||||
|
||||
func (db *postgres) SQLType(c *schemas.Column) string {
|
||||
var res string
|
||||
switch t := c.SQLType.Name; t {
|
||||
|
@ -833,12 +838,12 @@ func (db *postgres) SQLType(c *schemas.Column) string {
|
|||
case schemas.Bit:
|
||||
res = schemas.Boolean
|
||||
return res
|
||||
case schemas.MediumInt, schemas.Int, schemas.Integer:
|
||||
case schemas.MediumInt, schemas.Int, schemas.Integer, schemas.UnsignedInt:
|
||||
if c.IsAutoIncrement {
|
||||
return schemas.Serial
|
||||
}
|
||||
return schemas.Integer
|
||||
case schemas.BigInt:
|
||||
case schemas.BigInt, schemas.UnsignedBigInt:
|
||||
if c.IsAutoIncrement {
|
||||
return schemas.BigSerial
|
||||
}
|
||||
|
@ -1052,6 +1057,10 @@ WHERE n.nspname= s.table_schema AND c.relkind = 'r'::char AND c.relname = $1%s A
|
|||
}
|
||||
}
|
||||
|
||||
if colDefault != nil && *colDefault == "unique_rowid()" { // ignore the system column added by cockroach
|
||||
continue
|
||||
}
|
||||
|
||||
col.Name = strings.Trim(colName, `" `)
|
||||
|
||||
if colDefault != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue