Fix test
This commit is contained in:
parent
c53c61a6a1
commit
368935ad98
|
@ -334,7 +334,11 @@ func ColumnString(dialect Dialect, col *schemas.Column, includePrimaryKey bool)
|
||||||
}
|
}
|
||||||
|
|
||||||
if !col.DefaultIsEmpty {
|
if !col.DefaultIsEmpty {
|
||||||
|
<<<<<<< HEAD
|
||||||
if _, err := bd.WriteString(" DEFAULT "); err != nil {
|
if _, err := bd.WriteString(" DEFAULT "); err != nil {
|
||||||
|
=======
|
||||||
|
if _, err := bd.WriteString("DEFAULT "); err != nil {
|
||||||
|
>>>>>>> ab9b694 (Fix test)
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
if col.Default == "" {
|
if col.Default == "" {
|
||||||
|
|
|
@ -550,7 +550,10 @@ func (db *oracle) Features() *DialectFeatures {
|
||||||
func (db *oracle) SQLType(c *schemas.Column) string {
|
func (db *oracle) SQLType(c *schemas.Column) string {
|
||||||
var res string
|
var res string
|
||||||
switch t := c.SQLType.Name; t {
|
switch t := c.SQLType.Name; t {
|
||||||
case schemas.Bit, schemas.TinyInt, schemas.SmallInt, schemas.MediumInt, schemas.Int, schemas.Integer, schemas.BigInt, schemas.Bool, schemas.Serial, schemas.BigSerial:
|
case schemas.Bit, schemas.TinyInt, schemas.SmallInt, schemas.MediumInt, schemas.Int, schemas.Integer, schemas.BigInt,
|
||||||
|
schemas.UnsignedBigInt, schemas.UnsignedBit, schemas.UnsignedInt,
|
||||||
|
schemas.Bool,
|
||||||
|
schemas.Serial, schemas.BigSerial:
|
||||||
res = "NUMBER"
|
res = "NUMBER"
|
||||||
case schemas.Binary, schemas.VarBinary, schemas.Blob, schemas.TinyBlob, schemas.MediumBlob, schemas.LongBlob, schemas.Bytea:
|
case schemas.Binary, schemas.VarBinary, schemas.Blob, schemas.TinyBlob, schemas.MediumBlob, schemas.LongBlob, schemas.Bytea:
|
||||||
return schemas.Blob
|
return schemas.Blob
|
||||||
|
@ -802,7 +805,7 @@ func (db *oracle) GetColumns(queryer core.Queryer, ctx context.Context, tableNam
|
||||||
}
|
}
|
||||||
|
|
||||||
if _, ok := schemas.SqlTypes[col.SQLType.Name]; !ok {
|
if _, ok := schemas.SqlTypes[col.SQLType.Name]; !ok {
|
||||||
return nil, nil, fmt.Errorf("Unknown colType %v %v", *dataType, col.SQLType)
|
return nil, nil, fmt.Errorf("unknown colType %v %v", *dataType, col.SQLType)
|
||||||
}
|
}
|
||||||
|
|
||||||
col.Length = dataLen
|
col.Length = dataLen
|
||||||
|
@ -819,10 +822,6 @@ func (db *oracle) GetColumns(queryer core.Queryer, ctx context.Context, tableNam
|
||||||
return nil, nil, rows.Err()
|
return nil, nil, rows.Err()
|
||||||
}
|
}
|
||||||
|
|
||||||
/*select *
|
|
||||||
from user_tab_comments
|
|
||||||
where Table_Name='用户表' */
|
|
||||||
|
|
||||||
return colSeq, cols, nil
|
return colSeq, cols, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue