Fix test
This commit is contained in:
parent
52ce535184
commit
5510be60a3
|
@ -879,13 +879,13 @@ func (db *postgres) SetQuotePolicy(quotePolicy QuotePolicy) {
|
|||
func (db *postgres) SQLType(c *schemas.Column) string {
|
||||
var res string
|
||||
switch t := c.SQLType.Name; t {
|
||||
case schemas.TinyInt:
|
||||
case schemas.TinyInt, schemas.UnsignedTinyInt, schemas.UnsignedSmallInt:
|
||||
res = schemas.SmallInt
|
||||
return res
|
||||
case schemas.Bit:
|
||||
res = schemas.Boolean
|
||||
return res
|
||||
case schemas.MediumInt, schemas.Int, schemas.Integer:
|
||||
case schemas.MediumInt, schemas.Int, schemas.Integer, schemas.UnsignedMediumInt:
|
||||
if c.IsAutoIncrement {
|
||||
return schemas.Serial
|
||||
}
|
||||
|
|
|
@ -512,7 +512,7 @@ func TestUnsignedTinyInt(t *testing.T) {
|
|||
case schemas.MYSQL:
|
||||
assert.EqualValues(t, "UNSIGNED TINYINT", tables[0].Columns()[0].SQLType.Name)
|
||||
case schemas.POSTGRES:
|
||||
assert.EqualValues(t, "INT", tables[0].Columns()[0].SQLType.Name)
|
||||
assert.EqualValues(t, "SMALLINT", tables[0].Columns()[0].SQLType.Name)
|
||||
case schemas.MSSQL:
|
||||
assert.EqualValues(t, "INT", tables[0].Columns()[0].SQLType.Name)
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue