Skip to content

Commit

Permalink
Fix alembic migration
Browse files Browse the repository at this point in the history
Signed-off-by: Aishwarya Mathuria <[email protected]>
  • Loading branch information
amathuria committed Feb 28, 2024
1 parent 4ad5614 commit bcc6b4e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
8 changes: 2 additions & 6 deletions alembic/versions/e8de4928657_modify_jobs_table.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
"""modify jobs table
Revision ID: e8de4928657
Revises: 11e2594da07b
Revises: 266e6f3efd94
Create Date: 2021-06-28 13:45:32.717585
"""

# revision identifiers, used by Alembic.
revision = 'e8de4928657'
down_revision = '11e2594da07b'
down_revision = '266e6f3efd94'

from alembic import op
from paddles.models.types import JSONType
Expand All @@ -18,8 +18,6 @@


def upgrade():
op.add_column(u'jobs', sa.Column('first_in_suite', sa.Boolean(), nullable=True))
op.add_column(u'jobs', sa.Column('openstack', JSONType(), nullable=True))
op.add_column(u'jobs', sa.Column('priority', sa.Integer(), nullable=True))
op.add_column(u'jobs', sa.Column('repo', sa.String(length=256), nullable=True))
op.add_column(u'jobs', sa.Column('seed', sa.Integer(), nullable=True))
Expand Down Expand Up @@ -54,6 +52,4 @@ def downgrade():
op.drop_column(u'jobs', 'sleep_before_teardown')
op.drop_column(u'jobs', 'repo')
op.drop_column(u'jobs', 'priority')
op.drop_column(u'jobs', 'openstack')
op.drop_column(u'jobs', 'first_in_suite')

3 changes: 0 additions & 3 deletions paddles/models/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,10 @@ class Job(Base):
flavor = Column(String(128))
job_id = Column(String(32), index=True)
kernel = deferred(Column(JSONType()))
first_in_suite = Column(Boolean())
last_in_suite = Column(Boolean())
machine_type = Column(String(32))
name = Column(String(512))
nuke_on_error = Column(Boolean())
openstack = Column(JSONType())
os_type = Column(String(32))
os_version = Column(String(16))
overrides = deferred(Column(JSONType()))
Expand Down Expand Up @@ -122,7 +120,6 @@ class Job(Base):
"pcp_grafana_url",
"priority",
"user",
"first_in_suite",
"queue",
)

Expand Down

0 comments on commit bcc6b4e

Please sign in to comment.