fix(postgres): fixes db migration issue with_credentials column for postgres, fixes #3505

This commit is contained in:
Torkel Ödegaard
2015-12-14 10:19:53 +01:00
parent 10f66fa78f
commit c7e3ed096f
3 changed files with 18 additions and 2 deletions

View File

@ -36,6 +36,17 @@ func (db *Postgres) AutoIncrStr() string {
return ""
}
func (b *Postgres) Default(col *Column) string {
if col.Type == DB_Bool {
if col.Default == "0" {
return "FALSE"
} else {
return "TRUE"
}
}
return col.Default
}
func (db *Postgres) SqlType(c *Column) string {
var res string
switch t := c.Type; t {