diff --git a/migrations/versions/1ed411f9fdfa_drop_batchjob_download_url.py b/migrations/versions/1ed411f9fdfa_drop_batchjob_download_url.py new file mode 100644 index 0000000000000000000000000000000000000000..4856f6ab0c64b5567f89055f7a6ae75733d9355e --- /dev/null +++ b/migrations/versions/1ed411f9fdfa_drop_batchjob_download_url.py @@ -0,0 +1,30 @@ +"""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 ### diff --git a/mutalyzer/db/models.py b/mutalyzer/db/models.py index 90a94e19ad8717c085d3dfd4f598e6917fc9933c..03e6bf5bced054e8e45e4fcf4f22698f95c6fcde 100644 --- a/mutalyzer/db/models.py +++ b/mutalyzer/db/models.py @@ -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()