"""Mark a repeated session as a repetition. Sitting the same questions again is practice, not a new measurement: the answers have already been seen, so getting them right the second time says nothing about whether they were known. Such a session is still analysed on its own page — that is the point of repeating it — but it is left out of the figures that claim to say how much of the bank you know. Revision ID: d0e1f2a3b4c5 Revises: c9d0e1f2a3b4 """ import sqlalchemy as sa from alembic import op revision = "d0e1f2a3b4c5" down_revision = "c9d0e1f2a3b4" branch_labels = None depends_on = None def upgrade() -> None: op.add_column("quizzes", sa.Column("is_repetition", sa.Integer(), server_default="0")) op.create_index("ix_quizzes_is_repetition", "quizzes", ["is_repetition"]) def downgrade() -> None: op.drop_index("ix_quizzes_is_repetition", table_name="quizzes") op.drop_column("quizzes", "is_repetition")