Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mutalyzer
mutalyzer2
Commits
aa6b1b71
Commit
aa6b1b71
authored
Nov 09, 2015
by
Vermaat
Browse files
Merge pull request #123 from mutalyzer/drop-download-url
Drop BatchJob.download_url column
parents
22c8215c
7a1033e4
Changes
2
Hide whitespace changes
Inline
Side-by-side
migrations/versions/1ed411f9fdfa_drop_batchjob_download_url.py
0 → 100644
View file @
aa6b1b71
"""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 ###
mutalyzer/db/models.py
View file @
aa6b1b71
...
...
@@ -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
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment