mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-24 01:11:38 -05:00
make job.created_by nullable
Since letter jobs from the API aren't created by any single individual, lets make created_by nullable. Note: We'll have to make sure that we update the admin app to handle these jobs nicely
This commit is contained in:
24
migrations/versions/0113_job_created_by_nullable.py
Normal file
24
migrations/versions/0113_job_created_by_nullable.py
Normal file
@@ -0,0 +1,24 @@
|
||||
"""empty message
|
||||
|
||||
Revision ID: 0113_job_created_by_nullable
|
||||
Revises: 0112_add_start_end_dates
|
||||
Create Date: 2017-07-27 11:12:34.938086
|
||||
|
||||
"""
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '0113_job_created_by_nullable'
|
||||
down_revision = '0112_add_start_end_dates'
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.dialects import postgresql
|
||||
|
||||
def upgrade():
|
||||
op.alter_column('job', 'created_by', nullable=True)
|
||||
|
||||
|
||||
def downgrade():
|
||||
# This will error if there are any jobs with no created_by - we'll have to decide how to handle those as and when
|
||||
# we downgrade
|
||||
op.alter_column('job', 'created_by', nullable=False)
|
||||
Reference in New Issue
Block a user