[IMP] models.py: increase logging level for columns that can't be casted automatically when upgrading a module.
This commit is contained in:
parent
a8f94a59cd
commit
a59cf39f06
|
@ -2559,8 +2559,8 @@ class BaseModel(object):
|
|||
cr.execute('ALTER TABLE "%s" RENAME COLUMN "%s" TO "%s"' % (self._table, k, newname))
|
||||
cr.execute('ALTER TABLE "%s" ADD COLUMN "%s" %s' % (self._table, k, get_pg_type(f)[1]))
|
||||
cr.execute("COMMENT ON COLUMN %s.\"%s\" IS %%s" % (self._table, k), (f.string,))
|
||||
_schema.debug("Table '%s': column '%s' has changed type (DB=%s, def=%s), data moved to column %s !",
|
||||
self._table, k, f_pg_type, f._type, newname)
|
||||
_schema.warning("Table `%s`: column `%s` has changed type (DB=%s, def=%s), data moved to column `%s`",
|
||||
self._table, k, f_pg_type, f._type, newname)
|
||||
|
||||
# if the field is required and hasn't got a NOT NULL constraint
|
||||
if f.required and f_pg_notnull == 0:
|
||||
|
|
Loading…
Reference in New Issue