Skip to content
Snippets Groups Projects
Commit 7a1033e4 authored by Vermaat's avatar Vermaat
Browse files

Drop BatchJob.download_url column

This is now created on use, by #111.

Fixes #112
parent 22c8215c
No related branches found
No related tags found
No related merge requests found
"""Drop BatchJob.download_url
Revision ID: 1ed411f9fdfa
Revises: 10692e9f4836
Create Date: 2015-11-09 17:24:15.630818
"""
from __future__ import unicode_literals
# revision identifiers, used by Alembic.
revision = '1ed411f9fdfa'
down_revision = u'10692e9f4836'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('batch_jobs') as batch_op:
batch_op.drop_column('download_url')
### end Alembic commands ###
def downgrade():
### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('batch_jobs') as batch_op:
batch_op.add_column(sa.Column('download_url', sa.VARCHAR(length=200), autoincrement=False, nullable=True))
### end Alembic commands ###
......@@ -76,10 +76,6 @@ class BatchJob(db.Base):
#: Email address of user who submitted the job.
email = Column(String(200))
#: URL for downloading the job result file. This would usually be a view
#: on the Mutalyzer website.
download_url = Column(String(200))
#: Type of batch job.
job_type = Column(Enum(*BATCH_JOB_TYPES, name='job_type'), nullable=False)
......@@ -95,11 +91,9 @@ class BatchJob(db.Base):
#: Date and time of creation.
added = Column(DateTime)
def __init__(self, job_type, email=None, download_url=None,
argument=None):
def __init__(self, job_type, email=None, argument=None):
self.job_type = job_type
self.email = email
self.download_url = download_url
self.argument = argument
self.result_id = unicode(uuid.uuid4())
self.added = datetime.now()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment