Skip to content

Commit

Permalink
models/jobs: Add a few more fields to Jobs table
Browse files Browse the repository at this point in the history
In order to store the job configuration details in Paddles we need to
add a few columns to the existing Jobs table

Signed-off-by: Aishwarya Mathuria <[email protected]>
  • Loading branch information
amathuria committed Aug 8, 2023
1 parent dd00c4a commit e7506c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 6 additions & 1 deletion alembic/versions/e8de4928657_modify_jobs_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,18 @@ def upgrade():
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))
op.add_column(u'jobs', sa.Column('sleep_before_teardown', sa.Integer(), nullable=True))
op.add_column(u'jobs', sa.Column('subset', sa.String(length=32), nullable=True))
op.add_column(u'jobs', sa.Column('suite', sa.String(length=256), nullable=True))
op.add_column(u'jobs', sa.Column('suite_path', sa.String(length=256), nullable=True))
op.add_column(u'jobs', sa.Column('suite_relpath', sa.String(length=256), nullable=True))
op.add_column(u'jobs', sa.Column('suite_repo', sa.String(length=256), nullable=True))
op.add_column(u'jobs', sa.Column('teuthology_sha1', sa.String(length=40), nullable=True))
op.add_column(u'jobs', sa.Column('teuthology_branch', sa.String(length=256), nullable=True))
op.add_column(u'jobs', sa.Column('teuthology_sha1', sa.String(length=256), nullable=True))
op.add_column(u'jobs', sa.Column('timestamp', sa.DateTime(), nullable=True))
op.add_column(u'jobs', sa.Column('user', sa.String(length=64), nullable=True))
op.add_column(u'jobs', sa.Column('queue', sa.String(length=64), nullable=True))
op.create_index(op.f('ix_jobs_job_id'), 'jobs', ['job_id'], unique=False)
op.create_index(op.f('ix_jobs_teuthology_sha1'), 'jobs', ['teuthology_sha1'], unique=False)
op.execute(CreateSequence(Sequence('jobs_id_seq')))
Expand Down
1 change: 0 additions & 1 deletion paddles/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from sqlalchemy import create_engine, MetaData, event
from sqlalchemy.orm import scoped_session, sessionmaker, object_session, mapper
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.interfaces import PoolListener
from sqlalchemy.exc import InvalidRequestError, OperationalError
from sqlalchemy.pool import Pool
from pecan import conf
Expand Down

0 comments on commit e7506c7

Please sign in to comment.