mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	Upgrade xorm to v1.1.0 (#15869)
This commit is contained in:
		
							
								
								
									
										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 { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user