在SQLite3场景下,modify column不支持:Error: near MODIFY: syntax error
This commit is contained in:
parent
bbc89e7511
commit
d5a0855ace
|
@ -377,8 +377,10 @@ func (session *Session) Sync(beans ...interface{}) error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if col.Comment != oriCol.Comment {
|
} else if col.Comment != oriCol.Comment {
|
||||||
|
if engine.dialect.URI().DBType == schemas.POSTGRES {
|
||||||
_, err = session.exec(engine.dialect.ModifyColumnSQL(tbNameWithSchema, col))
|
_, err = session.exec(engine.dialect.ModifyColumnSQL(tbNameWithSchema, col))
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if col.Default != oriCol.Default {
|
if col.Default != oriCol.Default {
|
||||||
switch {
|
switch {
|
||||||
|
|
Loading…
Reference in New Issue