diff --git a/app/models.py b/app/models.py index 1c36d6c4..272880dd 100644 --- a/app/models.py +++ b/app/models.py @@ -57,9 +57,9 @@ class Instance(db.Model): last_successful_send = db.Column(db.DateTime) # When we successfully sent them an Activity failures = db.Column(db.Integer, default=0) # How many times we failed to send (reset to 0 after every successful send) most_recent_attempt = db.Column(db.DateTime) # When the most recent failure was - dormant = db.Column(db.Boolean, default=False, index=True) # True once this instance is considered offline and not worth sending to any more + dormant = db.Column(db.Boolean, default=False) # True once this instance is considered offline and not worth sending to any more start_trying_again = db.Column(db.DateTime) # When to start trying again. Should grow exponentially with each failure. - gone_forever = db.Column(db.Boolean, default=False, index=True) # True once this instance is considered offline forever - never start trying again + gone_forever = db.Column(db.Boolean, default=False) # True once this instance is considered offline forever - never start trying again ip_address = db.Column(db.String(50)) posts = db.relationship('Post', backref='instance', lazy='dynamic') diff --git a/migrations/versions/fd5d3a9cb584_community_topics.py b/migrations/versions/fd5d3a9cb584_community_topics.py index 64e1fac9..c06b038b 100644 --- a/migrations/versions/fd5d3a9cb584_community_topics.py +++ b/migrations/versions/fd5d3a9cb584_community_topics.py @@ -29,18 +29,12 @@ def upgrade(): batch_op.create_index(batch_op.f('ix_community_topic_id'), ['topic_id'], unique=False) batch_op.create_foreign_key(None, 'topic', ['topic_id'], ['id']) - with op.batch_alter_table('instance', schema=None) as batch_op: - batch_op.create_index(batch_op.f('ix_instance_dormant'), ['dormant'], unique=False) - batch_op.create_index(batch_op.f('ix_instance_gone_forever'), ['gone_forever'], unique=False) # ### end Alembic commands ### def downgrade(): # ### commands auto generated by Alembic - please adjust! ### - with op.batch_alter_table('instance', schema=None) as batch_op: - batch_op.drop_index(batch_op.f('ix_instance_gone_forever')) - batch_op.drop_index(batch_op.f('ix_instance_dormant')) with op.batch_alter_table('community', schema=None) as batch_op: batch_op.drop_constraint(None, type_='foreignkey')