forked from djeck1432/spotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request djeck1432#198 from mayasimi/feat/add_tg-user-field
feat: add telegram user field
- Loading branch information
Showing
3 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
web_app/alembic/versions/b1fdf24eae4f_add_is_allowed_notification_to_telegram_.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
"""add is_allowed_notification to telegram_user | ||
Revision ID: b1fdf24eae4f | ||
Revises: 02521fa24607 | ||
Create Date: 2024-11-13 22:46:54.671430 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
|
||
revision = 'b1fdf24eae4f' | ||
down_revision = '02521fa24607' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
"""Add is_allowed_notification column to telegram_user table""" | ||
op.add_column( | ||
'telegram_user', | ||
sa.Column('is_allowed_notification', sa.Boolean(), nullable=True) | ||
) | ||
|
||
def downgrade() -> None: | ||
"""Remove is_allowed_notification column from telegram_user table""" | ||
op.drop_column('telegram_user', 'is_allowed_notification') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters