-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check last run time on new table before calling function again
- Loading branch information
Showing
6 changed files
with
151 additions
and
45 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
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
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,33 @@ | ||
"""Create cron table | ||
Revision ID: 4ce73d5a92f4 | ||
Revises: 59f006d4ef93 | ||
Create Date: 2017-08-05 16:04:39.277508 | ||
""" | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '4ce73d5a92f4' | ||
down_revision = '59f006d4ef93' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
def upgrade(): | ||
op.create_table( | ||
'cron', | ||
sa.Column('name', sa.Text), | ||
sa.Column('interval', sa.Text), | ||
sa.Column('lastchecked', sa.Text(), nullable=True) | ||
) | ||
|
||
|
||
def downgrade(): | ||
""" | ||
Performs database downgrade | ||
""" | ||
|
||
op.drop_table('cron') |