diff --git a/chat/indico_chat/migrations/201409291524_1bd6c5129d29_create_tables.py b/chat/indico_chat/migrations/201409291524_1bd6c5129d29_create_tables.py index 5d2338d..90f976f 100644 --- a/chat/indico_chat/migrations/201409291524_1bd6c5129d29_create_tables.py +++ b/chat/indico_chat/migrations/201409291524_1bd6c5129d29_create_tables.py @@ -35,8 +35,7 @@ def upgrade(): op.create_table('chatroom_events', sa.Column('event_id', sa.Integer(), nullable=False, primary_key=True, index=True, autoincrement=False), - sa.Column('chatroom_id', sa.Integer(), nullable=False, primary_key=True, index=True, - autoincrement=False), + sa.Column('chatroom_id', sa.Integer(), nullable=False, primary_key=True, index=True), sa.Column('hidden', sa.Boolean(), nullable=False), sa.Column('show_password', sa.Boolean(), nullable=False), sa.ForeignKeyConstraint(['chatroom_id'], ['plugin_chat.chatrooms.id']), diff --git a/chat/indico_chat/models/chatrooms.py b/chat/indico_chat/models/chatrooms.py index b6bf71d..809760c 100644 --- a/chat/indico_chat/models/chatrooms.py +++ b/chat/indico_chat/models/chatrooms.py @@ -114,7 +114,8 @@ class ChatroomEventAssociation(db.Model): event_id = db.Column( db.Integer, primary_key=True, - index=True + index=True, + autoincrement=False ) #: ID of the chatroom chatroom_id = db.Column(