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.
This commit is contained in:
parent
efcd128062
commit
a6267ac1fa
1 changed files with 0 additions and 9 deletions
|
|
@ -151,9 +151,6 @@ class Profile(Base):
|
||||||
Integer,
|
Integer,
|
||||||
primary_key=True,
|
primary_key=True,
|
||||||
nullable=True,
|
nullable=True,
|
||||||
# settings autoincrement would have negative performance impact
|
|
||||||
# cf. https://sqlite.org/autoinc.html
|
|
||||||
autoincrement=False
|
|
||||||
)
|
)
|
||||||
name = Column(Text, unique=True)
|
name = Column(Text, unique=True)
|
||||||
|
|
||||||
|
|
@ -316,8 +313,6 @@ class Message(Base):
|
||||||
id = Column(
|
id = Column(
|
||||||
Integer,
|
Integer,
|
||||||
primary_key=True,
|
primary_key=True,
|
||||||
# cf. note for Profile.id
|
|
||||||
autoincrement=False
|
|
||||||
)
|
)
|
||||||
history_uid = Column(ForeignKey("history.uid", ondelete="CASCADE"))
|
history_uid = Column(ForeignKey("history.uid", ondelete="CASCADE"))
|
||||||
message = Column(Text)
|
message = Column(Text)
|
||||||
|
|
@ -339,8 +334,6 @@ class Subject(Base):
|
||||||
id = Column(
|
id = Column(
|
||||||
Integer,
|
Integer,
|
||||||
primary_key=True,
|
primary_key=True,
|
||||||
# cf. note for Profile.id
|
|
||||||
autoincrement=False,
|
|
||||||
)
|
)
|
||||||
history_uid = Column(ForeignKey("history.uid", ondelete="CASCADE"))
|
history_uid = Column(ForeignKey("history.uid", ondelete="CASCADE"))
|
||||||
subject = Column(Text)
|
subject = Column(Text)
|
||||||
|
|
@ -362,8 +355,6 @@ class Thread(Base):
|
||||||
id = Column(
|
id = Column(
|
||||||
Integer,
|
Integer,
|
||||||
primary_key=True,
|
primary_key=True,
|
||||||
# cf. note for Profile.id
|
|
||||||
autoincrement=False,
|
|
||||||
)
|
)
|
||||||
history_uid = Column(ForeignKey("history.uid", ondelete="CASCADE"))
|
history_uid = Column(ForeignKey("history.uid", ondelete="CASCADE"))
|
||||||
thread_id = Column(Text)
|
thread_id = Column(Text)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue