opencompletion.com/migrations/versions/d3631b8bb652_add_activitystate_table.py
Russell Ballestrini 1b44c2d66b Integrate comprehensive testing framework with Makefile
- Added unit tests for YAML loading and parsing functionality
- Created integration tests for multiple activity files validation
- Implemented functional tests for complete activity workflows
- Added battleship pre_script functionality tests
- Integrated all test types into comprehensive Makefile
- Fixed CLI validator test with proper failing fixture
- Applied black formatting to all Python files
- Removed problematic hardcoded targets from Makefile
- Added proper venv dependency management

Test coverage includes:
- Unit: YAML loading, validator functionality
- Integration: Cross-file validation, metadata operations
- Functional: End-to-end activity flows, pre_script execution
- All 30 activity files validated and tested
2025-08-10 19:38:50 -04:00

42 lines
1.1 KiB
Python

"""Add ActivityState table
Revision ID: d3631b8bb652
Revises: 190d5ef26e20
Create Date: 2024-07-27 09:33:52.544550
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "d3631b8bb652"
down_revision = "190d5ef26e20"
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table(
"activity_state",
sa.Column("id", sa.Integer(), nullable=False),
sa.Column("room_id", sa.Integer(), nullable=False),
sa.Column("section_id", sa.String(length=128), nullable=False),
sa.Column("step_id", sa.String(length=128), nullable=False),
sa.Column("attempts", sa.Integer(), nullable=True),
sa.Column("max_attempts", sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(
["room_id"],
["room.id"],
),
sa.PrimaryKeyConstraint("id"),
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table("activity_state")
# ### end Alembic commands ###