Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/base/tests/test_ensure_has_pk.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def invariant(self):
JOIN pg_namespace ns on ns.oid = c.relnamespace
LEFT JOIN pg_constraint p on p.conrelid = c.oid and p.contype = 'p'
WHERE c.relkind IN ('r', 'p')
AND c.relpersistence = 'p'
AND ns.nspname = current_schema
AND p.oid IS NULL
ORDER BY c.relname
Expand All @@ -28,7 +29,7 @@ def invariant(self):
cr.execute(query)
if cr.rowcount:
tables = "\n".join(" - %s" % t for (t,) in cr.fetchall())
msg = "Some tables doesn't have any primary key:\n{}".format(tables)
msg = "Some tables don't have any primary key:\n{}".format(tables)
_logger.critical(msg)
if util.on_CI():
raise AssertionError(msg)