
This feature detects when Gertty is about to upload a review with a positive vote after someone else has left a negative vote while Gertty was offline. This prevents a situation where it appears a user is ignoring negative feedback from others. The local user is alerted and has the option to re-evaluate their review before proceeding. Change-Id: I838acaae6d12a2f8557bfd5a16837784c97c031a
38 lines
817 B
Python
38 lines
817 B
Python
"""add held
|
|
|
|
Revision ID: 3cc7e3753dc3
|
|
Revises: 1cdd4e2e74c
|
|
Create Date: 2015-03-22 08:48:15.516289
|
|
|
|
"""
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '3cc7e3753dc3'
|
|
down_revision = '1cdd4e2e74c'
|
|
|
|
import warnings
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
from gertty.dbsupport import sqlite_alter_columns
|
|
|
|
|
|
def upgrade():
|
|
with warnings.catch_warnings():
|
|
warnings.simplefilter("ignore")
|
|
op.add_column('change', sa.Column('held', sa.Boolean()))
|
|
|
|
connection = op.get_bind()
|
|
change = sa.sql.table('change',
|
|
sa.sql.column('held', sa.Boolean()))
|
|
connection.execute(change.update().values({'held':False}))
|
|
|
|
sqlite_alter_columns('change', [
|
|
sa.Column('held', sa.Boolean(), index=True, nullable=False),
|
|
])
|
|
|
|
|
|
def downgrade():
|
|
pass
|