27bcb4cd80c1_.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:gloss 作者: openhealthcare 项目源码 文件源码
def downgrade():
    op.drop_table('inpatientlocation')
    op.drop_table('inpatientadmission')

    op.create_table('inpatientepisode',
    sa.Column('id', sa.INTEGER(), nullable=False),
    sa.Column('updated', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
    sa.Column('created', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
    sa.Column('datetime_of_admission', postgresql.TIMESTAMP(), autoincrement=False, nullable=False),
    sa.Column('datetime_of_discharge', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
    sa.Column('visit_number', sa.VARCHAR(length=250), autoincrement=False, nullable=False),
    sa.Column('admission_diagnosis', sa.VARCHAR(length=250), autoincrement=False, nullable=True),
    sa.Column('gloss_reference_id', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.ForeignKeyConstraint(['gloss_reference_id'], [u'glossolaliareference.id'], name=u'inpatientepisode_gloss_reference_id_fkey'),
    sa.PrimaryKeyConstraint('id', name=u'inpatientepisode_pkey')
    )
    op.create_table('inpatientlocation',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('updated', sa.DateTime(), nullable=True),
    sa.Column('created', sa.DateTime(), nullable=True),
    sa.Column('inpatient_episode_id', sa.Integer(), nullable=True),
    sa.Column('datetime_of_transfer', sa.DateTime(), nullable=True),
    sa.Column('ward_code', sa.String(length=250), nullable=True),
    sa.Column('room_code', sa.String(length=250), nullable=True),
    sa.Column('bed_code', sa.String(length=250), nullable=True),
    sa.ForeignKeyConstraint(['inpatient_episode_id'], ['inpatientepisode.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    ### end Alembic commands ###
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号