changeset 3639:05db744f194f

core (memory/sql_mapping): remove autoincrement: SQLite specific behaviour with autoincrement (https://sqlite.org/autoinc.html) is actually already handled by SQLAlchemy, and unsetting autoincrement cause troubles when storing new objects.
author Goffi <goffi@goffi.org>
date Wed, 01 Sep 2021 15:25:02 +0200
parents 257135d5c5c2
children cbb988a6f507
files sat/memory/sqla_mapping.py
diffstat 1 files changed, 0 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/sat/memory/sqla_mapping.py	Wed Sep 01 15:24:59 2021 +0200
+++ b/sat/memory/sqla_mapping.py	Wed Sep 01 15:25:02 2021 +0200
@@ -151,9 +151,6 @@
         Integer,
         primary_key=True,
         nullable=True,
-        # settings autoincrement would have negative performance impact
-        # cf. https://sqlite.org/autoinc.html
-        autoincrement=False
     )
     name = Column(Text, unique=True)
 
@@ -316,8 +313,6 @@
     id = Column(
         Integer,
         primary_key=True,
-        # cf. note for Profile.id
-        autoincrement=False
     )
     history_uid = Column(ForeignKey("history.uid", ondelete="CASCADE"))
     message = Column(Text)
@@ -339,8 +334,6 @@
     id = Column(
         Integer,
         primary_key=True,
-        # cf. note for Profile.id
-        autoincrement=False,
     )
     history_uid = Column(ForeignKey("history.uid", ondelete="CASCADE"))
     subject = Column(Text)
@@ -362,8 +355,6 @@
     id = Column(
         Integer,
         primary_key=True,
-        # cf. note for Profile.id
-        autoincrement=False,
     )
     history_uid = Column(ForeignKey("history.uid", ondelete="CASCADE"))
     thread_id = Column(Text)