[MERGE] forward port branch saas-15 up to 4d4d75709d

This commit is contained in:
Christophe Simonis
2017-09-04 18:12:00 +02:00
14 changed files with 66 additions and 39 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ _CONFDELTYPES = {
def table_exists(cr, tablename):
""" Return whether the given table exists. """
query = "SELECT 1 FROM information_schema.tables WHERE table_name=%s"
query = "SELECT 1 FROM pg_class WHERE relkind IN ('r', 'v', 'm') AND relname=%s"
cr.execute(query, (tablename,))
return cr.rowcount