diff options
| author | Barry Warsaw | 2016-03-24 21:49:37 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2016-03-24 21:49:37 -0400 |
| commit | e1876e6f699ab4b212d689786297f6f1e70c1551 (patch) | |
| tree | 6f3b96a233602451cc6eaf450032a56a3344c85c /src/mailman/database/postgresql.py | |
| parent | 5404f98d90410d69a744d9c0fb71a8a31f3a4a88 (diff) | |
| download | mailman-e1876e6f699ab4b212d689786297f6f1e70c1551.tar.gz mailman-e1876e6f699ab4b212d689786297f6f1e70c1551.tar.zst mailman-e1876e6f699ab4b212d689786297f6f1e70c1551.zip | |
Diffstat (limited to 'src/mailman/database/postgresql.py')
| -rw-r--r-- | src/mailman/database/postgresql.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/mailman/database/postgresql.py b/src/mailman/database/postgresql.py index a83119f66..a09ee3038 100644 --- a/src/mailman/database/postgresql.py +++ b/src/mailman/database/postgresql.py @@ -17,17 +17,13 @@ """PostgreSQL database support.""" -__all__ = [ - 'PostgreSQLDatabase', - ] - - +from mailman import public from mailman.database.base import SABaseDatabase from mailman.database.model import Model from sqlalchemy import Integer - +@public class PostgreSQLDatabase(SABaseDatabase): """Database class for PostgreSQL.""" @@ -45,8 +41,8 @@ class PostgreSQLDatabase(SABaseDatabase): for table in tables: for column in table.primary_key: if (column.autoincrement - and isinstance(column.type, Integer) - and not column.foreign_keys): + and isinstance(column.type, Integer) # flake8: noqa + and not column.foreign_keys): # flake8: noqa store.execute("""\ SELECT setval('"{0}_{1}_seq"', coalesce(max("{1}"), 1), max("{1}") IS NOT null) |
