summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2014-11-25 16:02:46 +0100
committerThomas Bruederli <bruederli@kolabsys.com>2014-11-25 16:02:46 +0100
commit4a4944f0de22c03fdb9d542bfd6c2fd91fda6f97 (patch)
treef480268d7d69b7e1843026ae000724803a731b7f /bin
parentd49a7ea6c05521995afa8b73fcf0e638931f83d9 (diff)
downloadpykolab-4a4944f0de22c03fdb9d542bfd6c2fd91fda6f97.tar.gz
Add sequences to auto-incrementing primary keys in order to work with Oracle databases (#3826)
Diffstat (limited to 'bin')
-rwxr-xr-xbin/kolab_smtp_access_policy.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/kolab_smtp_access_policy.py b/bin/kolab_smtp_access_policy.py
index 4b3d89b..321f488 100755
--- a/bin/kolab_smtp_access_policy.py
+++ b/bin/kolab_smtp_access_policy.py
@@ -37,6 +37,7 @@ from sqlalchemy import Integer
from sqlalchemy import MetaData
from sqlalchemy import String
from sqlalchemy import Table
+from sqlalchemy import Sequence
from sqlalchemy import create_engine
from sqlalchemy.orm import mapper
@@ -84,7 +85,7 @@ except:
session = None
policy_result_table = Table(
'policy_result', metadata,
- Column('id', Integer, primary_key=True),
+ Column('id', Integer, Sequence('seq_id_result'), primary_key=True),
Column('key', String(16), nullable=False),
Column('value', Boolean, nullable=False),
Column('sender', String(64), nullable=False),
@@ -127,7 +128,7 @@ mapper(PolicyResult, policy_result_table)
statistic_table = Table(
'statistic', metadata,
- Column('id', Integer, primary_key=True),
+ Column('id', Integer, Sequence('seq_id_statistic'), primary_key=True),
Column('sender', String(64), nullable=False),
Column('recipient', String(64), nullable=False),
Column('date', Date, nullable=False),