Skip to content

Commit

Permalink
Исправление миграций
Browse files Browse the repository at this point in the history
  • Loading branch information
NasqwozDilemma committed Aug 17, 2024
1 parent 4cca6d9 commit dedf22c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
passphrase: ${{ secrets.SSH_PASSPHRASE }}
script: |
cd /home/yc-user/Privet_Logoped_team_4/
git pull origin dev
git pull origin bug/fix_workflow_deployment
source /home/yc-user/Privet_Logoped_team_4/src/telegram_bot/venv/bin/activate
pip install -r src/telegram_bot/requirements.txt
alembic upgrade head
Expand Down
6 changes: 5 additions & 1 deletion alembic/versions/2fa551197c57_add_notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,12 @@ def upgrade() -> None:
)
op.add_column(
"tg_users",
sa.Column("notifications_enabled", sa.Boolean(), nullable=False, default=False),
sa.Column("notifications_enabled", sa.Boolean(), default=False),
)
op.execute(
'UPDATE tg_users SET notifications_enabled = False WHERE notifications_enabled IS NULL'
)
op.alter_column('tg_users', 'notifications_enabled', nullable=False)
op.add_column(
"vk_users", sa.Column("notificate_at", sa.Integer(), nullable=True)
)
Expand Down

0 comments on commit dedf22c

Please sign in to comment.