-
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 #20 from HeySlava/by_month
Add report by_month
- Loading branch information
Showing
4 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
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
30 changes: 30 additions & 0 deletions
30
bot/migrations/versions/09d3b6f33b87_report_by_month_release.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,30 @@ | ||
"""Report by month release | ||
Revision ID: 09d3b6f33b87 | ||
Revises: 277fe7039415 | ||
Create Date: 2023-12-08 22:48:55.609781 | ||
""" | ||
from alembic import op | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = '09d3b6f33b87' | ||
down_revision = '277fe7039415' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
msg = ( | ||
'Обновление:' | ||
'\n\n' | ||
'Доступна группировка по месяцу для отчета' | ||
) | ||
stmt = f"insert into releases(id, message, is_broadcasted) values (7, '{msg}', 0)" | ||
op.execute(stmt) | ||
|
||
|
||
def downgrade() -> None: | ||
stmt = 'delete from releases where id = 7' | ||
op.execute(stmt) |
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