diff --git a/migrations/versions/add_friends_table_stub.py b/migrations/versions/add_friends_table_stub.py new file mode 100644 index 0000000..86696a8 --- /dev/null +++ b/migrations/versions/add_friends_table_stub.py @@ -0,0 +1,30 @@ +"""Stub for add_friends_table revision + +The original add_friends_table migration file was never committed to the repo, +but 6ec7ce03bb6a_change_workout_goal_type_to_integer.py references it as its +down_revision. Without this stub, Alembic cannot traverse the migration graph +and `flask db upgrade` / `db stamp` fail with KeyError: 'add_friends_table'. + +This stub is a no-op — the friends table is created by SQLAlchemy +Base.metadata.create_all() in init_db(), not by any migration. + +Revision ID: add_friends_table +Revises: +Create Date: 2026-04-19 20:09:00.000000 +""" +from alembic import op +import sqlalchemy as sa + + +revision = 'add_friends_table' +down_revision = None +branch_labels = None +depends_on = None + + +def upgrade(): + pass + + +def downgrade(): + pass diff --git a/src/schema.py b/src/schema.py index f1bd193..95657cf 100644 --- a/src/schema.py +++ b/src/schema.py @@ -220,6 +220,8 @@ def resolve_class_instances(self, info): # MARK: - Class Instance + + class ClassInstance(SQLAlchemyObjectType): class Meta: model = ClassInstanceModel