9e8429737ba0_.py 文件源码

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

项目:bit 作者: codesmart-co 项目源码 文件源码
def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('bit_facebook_ad',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('ad_set_id', sa.Integer(), nullable=True),
    sa.Column('native_id', sa.String(length=255), nullable=True),
    sa.Column('account_id', sa.String(length=255), nullable=True),
    sa.Column('campaign_id', sa.String(length=255), nullable=True),
    sa.Column('adset_id', sa.String(length=255), nullable=True),
    sa.Column('name', sa.String(length=255), nullable=True),
    sa.Column('bid_amount', sa.Integer(), nullable=True),
    sa.Column('bid_info', sa.String(length=255), nullable=True),
    sa.Column('bid_type', sa.String(length=255), nullable=True),
    sa.Column('configured_status', sa.String(length=255), nullable=True),
    sa.Column('effective_status', sa.String(length=255), nullable=True),
    sa.Column('status', sa.String(length=255), nullable=True),
    sa.Column('created_time', sa.DateTime(), nullable=True),
    sa.Column('updated_time', sa.DateTime(), nullable=True),
    sa.ForeignKeyConstraint(['ad_set_id'], ['bit_facebook_ad_sets.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_bit_facebook_ad_native_id'), 'bit_facebook_ad', ['native_id'], unique=True)
    op.add_column(u'bit_facebook_ad_campaigns', sa.Column('ad_account_id', sa.Integer(), nullable=True))
    op.drop_index('ix_bit_facebook_ad_campaigns_account_id', table_name='bit_facebook_ad_campaigns')
    op.create_foreign_key(None, 'bit_facebook_ad_campaigns', 'bit_facebook_ad_account', ['ad_account_id'], ['id'])
    op.add_column(u'bit_facebook_ad_sets', sa.Column('ad_campaign_id', sa.Integer(), nullable=True))
    op.drop_index('ix_bit_facebook_ad_sets_account_id', table_name='bit_facebook_ad_sets')
    op.drop_index('ix_bit_facebook_ad_sets_campaign_id', table_name='bit_facebook_ad_sets')
    op.create_foreign_key(None, 'bit_facebook_ad_sets', 'bit_facebook_ad_campaigns', ['ad_campaign_id'], ['id'])
    # ### end Alembic commands ###
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号