mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 17:31:14 -05:00
Add job to queue as soon as it in created.
Added status to job.
This commit is contained in:
29
migrations/versions/0012_add_status_to_job.py
Normal file
29
migrations/versions/0012_add_status_to_job.py
Normal file
@@ -0,0 +1,29 @@
|
||||
"""empty message
|
||||
|
||||
Revision ID: 0012_add_status_to_job
|
||||
Revises: 0011_uuid_service_id
|
||||
Create Date: 2016-02-02 11:25:34.402864
|
||||
|
||||
"""
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '0012_add_status_to_job'
|
||||
down_revision = '0011_uuid_service_id'
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
def upgrade():
|
||||
### commands auto generated by Alembic - please adjust! ###
|
||||
job_status_types = sa.Enum('pending', 'in progress', 'finished', name='job_status_types')
|
||||
job_status_types.create(op.get_bind())
|
||||
op.add_column('jobs', sa.Column('status', job_status_types, nullable=False))
|
||||
### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column('jobs', 'status')
|
||||
op.execute('DROP TYPE job_status_types')
|
||||
### end Alembic commands ###
|
||||
Reference in New Issue
Block a user