Merge pull request #10 from whtvrboo/fix/docker-migrations

Fix(alembic): Resolve TypeError in migration script and remove redund…
This commit is contained in:
whtvrboo 2025-06-01 19:17:07 +02:00 committed by GitHub
commit 09c3160fbb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -25,7 +25,7 @@ recurrence_type_enum = postgresql.ENUM('DAILY', 'WEEKLY', 'MONTHLY', 'YEARLY', n
chore_frequency_enum = postgresql.ENUM('one_time', 'daily', 'weekly', 'monthly', 'custom', name='chorefrequencyenum', create_type=False)
chore_type_enum = postgresql.ENUM('personal', 'group', name='choretypeenum', create_type=False)
def upgrade() -> None:
def upgrade(context=None) -> None: # Add context=None for compatibility, real arg passed by Alembic
# Create enums
user_role_enum.create(op.get_bind(), checkfirst=True)
split_type_enum.create(op.get_bind(), checkfirst=True)
@ -280,7 +280,7 @@ def upgrade() -> None:
op.create_index(op.f('ix_settlement_activities_paid_by_user_id'), 'settlement_activities', ['paid_by_user_id'], unique=False)
def downgrade() -> None:
def downgrade(context=None) -> None: # Add context=None for compatibility, real arg passed by Alembic
op.drop_table('settlement_activities')
op.drop_table('settlements')
op.drop_table('expense_splits')

View File

@ -242,7 +242,7 @@ async def startup_event():
logger.info(f"Application startup in {settings.ENVIRONMENT} environment...")
# Run database migrations
await run_migrations()
# await run_migrations()
# Initialize scheduler
init_scheduler()