From af23d2bedd37c50cd0ff3fcb2d598639b70e300d Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Wed, 18 Jan 2017 15:04:26 -0500 Subject: [PATCH] Remove unique from queue item state_id --- data/database.py | 2 +- .../versions/fc47c1ec019f_add_state_id_field_to_queueitem.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/database.py b/data/database.py index 85db74142..be727238f 100644 --- a/data/database.py +++ b/data/database.py @@ -762,7 +762,7 @@ class QueueItem(BaseModel): available = BooleanField(default=True) processing_expires = DateTimeField(null=True) retries_remaining = IntegerField(default=5) - state_id = CharField(default=uuid_generator, index=True, unique=True) + state_id = CharField(default=uuid_generator, index=True, unique=False) class Meta: database = db diff --git a/data/migrations/versions/fc47c1ec019f_add_state_id_field_to_queueitem.py b/data/migrations/versions/fc47c1ec019f_add_state_id_field_to_queueitem.py index c5d5dcb2c..7b9085521 100644 --- a/data/migrations/versions/fc47c1ec019f_add_state_id_field_to_queueitem.py +++ b/data/migrations/versions/fc47c1ec019f_add_state_id_field_to_queueitem.py @@ -17,7 +17,7 @@ from sqlalchemy.dialects import mysql def upgrade(tables): # ### commands auto generated by Alembic - please adjust! ### op.add_column('queueitem', sa.Column('state_id', sa.String(length=255), nullable=False, server_default='')) - op.create_index('queueitem_state_id', 'queueitem', ['state_id'], unique=True) + op.create_index('queueitem_state_id', 'queueitem', ['state_id'], unique=False) # ### end Alembic commands ###