bin/kolab_smtp_access_policy.py

Thomas Brüderli bruederli at kolabsys.com
Tue Nov 25 16:03:02 CET 2014


 bin/kolab_smtp_access_policy.py |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 4a4944f0de22c03fdb9d542bfd6c2fd91fda6f97
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date:   Tue Nov 25 16:02:46 2014 +0100

    Add sequences to auto-incrementing primary keys in order to work with Oracle databases (#3826)

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),




More information about the commits mailing list