Commit 1d75df5a authored by Vojtech Sodoma's avatar Vojtech Sodoma

3366 - add autoincrement option to extension, func_key and user_line

This is required by sqlalchemy 1.1
parent f7ea1f9d
......@@ -38,7 +38,7 @@ class Extension(Base):
Index('extensions__idx__typeval', 'typeval'),
)
id = Column(Integer)
id = Column(Integer, autoincrement=True)
commented = Column(Integer, nullable=False, server_default='0')
context = Column(String(39), nullable=False, server_default='')
exten = Column(String(40), nullable=False, server_default='')
......
......@@ -29,7 +29,7 @@ class FuncKey(Base):
__tablename__ = 'func_key'
id = Column(Integer, primary_key=True)
id = Column(Integer, primary_key=True, autoincrement=True)
type_id = Column(Integer, ForeignKey('func_key_type.id'), nullable=False)
destination_type_id = Column(Integer,
ForeignKey('func_key_destination_type.id'),
......
......@@ -30,7 +30,7 @@ class UserLine(Base):
UniqueConstraint('user_id', 'line_id'),
)
id = Column(Integer, nullable=False)
id = Column(Integer, nullable=False, autoincrement=True)
user_id = Column(Integer, ForeignKey('userfeatures.id'))
line_id = Column(Integer, ForeignKey('linefeatures.id'), nullable=False)
extension_id = Column(Integer, ForeignKey('extensions.id'))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment