def upgrade():
"""Upgrade the database to a newer revision."""
# commands auto generated by Alembic - please adjust! ###
op.create_table('analyses',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('ecosystem', sa.Integer(), nullable=True),
sa.Column('package', sa.String(length=255), nullable=True),
sa.Column('version', sa.String(length=255), nullable=True),
sa.Column('access_count', sa.Integer(), nullable=True),
sa.Column('started_at', sa.DateTime(), nullable=True),
sa.Column('finished_at', sa.DateTime(), nullable=True),
sa.Column('analyses', postgresql.JSONB(), nullable=True),
sa.Column('subtasks', postgresql.JSONB(), nullable=True),
sa.Column('release', sa.String(length=255), nullable=True),
sa.Column('audit', postgresql.JSONB(), nullable=True),
sa.PrimaryKeyConstraint('id'))
op.create_table('worker_results',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('worker', sa.String(length=255), nullable=True),
sa.Column('analysis_id', sa.Integer(), nullable=True),
sa.Column('task_result', postgresql.JSONB(), nullable=True),
sa.ForeignKeyConstraint(['analysis_id'], ['analyses.id'], ),
sa.PrimaryKeyConstraint('id'))
# end Alembic commands ###
963d3d929b19_analyses.py 文件源码
python
阅读 24
收藏 0
点赞 0
评论 0
评论列表
文章目录