mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 17:31:14 -05:00
Add a new status to the job statuses to handle errors.
This commit is contained in:
22
migrations/versions/0071_add_job_error_state.py
Normal file
22
migrations/versions/0071_add_job_error_state.py
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
"""empty message
|
||||||
|
|
||||||
|
Revision ID: 0071_add_job_error_state
|
||||||
|
Revises: 0070_fix_notify_user_email
|
||||||
|
Create Date: 2017-03-10 16:15:22.153948
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
# revision identifiers, used by Alembic.
|
||||||
|
revision = '0071_add_job_error_state'
|
||||||
|
down_revision = '0070_fix_notify_user_email'
|
||||||
|
|
||||||
|
from alembic import op
|
||||||
|
import sqlalchemy as sa
|
||||||
|
|
||||||
|
|
||||||
|
def upgrade():
|
||||||
|
op.execute("INSERT INTO JOB_STATUS VALUES('error')")
|
||||||
|
|
||||||
|
|
||||||
|
def downgrade():
|
||||||
|
op.execute("DELETE FROM JOB_STATUS WHERE name = 'error'")
|
||||||
Reference in New Issue
Block a user