-
Notifications
You must be signed in to change notification settings - Fork 9
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 #831 from msusicky/develop
2.11.1
- Loading branch information
Showing
4 changed files
with
66 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
"""empty message | ||
Revision ID: 51de7be0564a | ||
Revises: 3b95f1f53d17 | ||
Create Date: 2024-04-22 17:26:44.675531 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = '51de7be0564a' | ||
down_revision = '3b95f1f53d17' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
with op.batch_alter_table('praktici_kapacity', schema=None) as batch_op: | ||
batch_op.add_column(sa.Column('aktivni', sa.Boolean(), nullable=True)) | ||
|
||
op.execute("UPDATE praktici_kapacity SET aktivni = coalesce(praktici_kapacity.expirace > now(), true) and pocet_davek > 0") | ||
|
||
with op.batch_alter_table('praktici_kapacity', schema=None) as batch_op: | ||
batch_op.alter_column('aktivni', nullable=False) | ||
|
||
with op.batch_alter_table('praktici_login', schema=None) as batch_op: | ||
batch_op.add_column(sa.Column('neregistrovani', sa.Boolean(), nullable=True)) | ||
|
||
op.execute("UPDATE praktici_login SET neregistrovani = False") | ||
|
||
with op.batch_alter_table('praktici_login', schema=None) as batch_op: | ||
batch_op.alter_column('neregistrovani', nullable=False) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
with op.batch_alter_table('praktici_login', schema=None) as batch_op: | ||
batch_op.drop_column('neregistrovani') | ||
|
||
with op.batch_alter_table('praktici_kapacity', schema=None) as batch_op: | ||
batch_op.drop_column('aktivni') | ||
# ### end Alembic commands ### |
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
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 |
---|---|---|
@@ -1,10 +1,14 @@ | ||
# daily fetcher | ||
30 6 * * * bash /home/ockovani/prd/app/scripts/execute_action.sh 15481697 | ||
# hourly fetcher | ||
30 7-22 * * * bash /home/ockovani/prd/app/scripts/execute_action.sh 15481698 | ||
20 6 * * * bash /home/ockovani/prd/app/scripts/execute_action.sh 15481697 | ||
|
||
# hourly fetcher - disabled, centers probably don't update that often | ||
# 30 7-22 * * * bash /home/ockovani/prd/app/scripts/execute_action.sh 15481698 | ||
|
||
# monthly fetcher | ||
00 5 5 * * bash /home/ockovani/prd/app/scripts/execute_action.sh 16635318 | ||
|
||
# update GP page | ||
1/5 * * * * bash /home/ockovani/prd/app/scripts/execute_action.sh 94783487 | ||
2/5 * * * * bash /home/ockovani/prd/app/scripts/execute_action.sh 94783487 | ||
|
||
# post tweet - disabled | ||
# 35 7 * * * bash /home/ockovani/prd/app/scripts/execute_action.sh 6797956 |