[IMP] models.py: do not log handled "bad query"

This commit is contained in:
Christophe Simonis 2015-02-04 14:44:50 +01:00
parent d87aedb731
commit 7ab70cab74
1 changed files with 1 additions and 1 deletions

View File

@ -2508,7 +2508,7 @@ class BaseModel(object):
if f_pg_type == 'varchar' and f._type in ('char', 'selection') and f_pg_size and (f.size is None or f_pg_size < f.size):
try:
with cr.savepoint():
cr.execute('ALTER TABLE "%s" ALTER COLUMN "%s" TYPE %s' % (self._table, k, pg_varchar(f.size)))
cr.execute('ALTER TABLE "%s" ALTER COLUMN "%s" TYPE %s' % (self._table, k, pg_varchar(f.size)), log_exceptions=False)
except psycopg2.NotSupportedError:
# In place alter table cannot be done because a view is depending of this field.
# Do a manual copy. This will drop the view (that will be recreated later)