当前位置: 首页>>代码示例>>Python>>正文


Python sqlalchemy.BIGINT属性代码示例

本文整理汇总了Python中sqlalchemy.BIGINT属性的典型用法代码示例。如果您正苦于以下问题:Python sqlalchemy.BIGINT属性的具体用法?Python sqlalchemy.BIGINT怎么用?Python sqlalchemy.BIGINT使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在sqlalchemy的用法示例。


在下文中一共展示了sqlalchemy.BIGINT属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: downgrade

# 需要导入模块: import sqlalchemy [as 别名]
# 或者: from sqlalchemy import BIGINT [as 别名]
def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.add_column('feed_pages', sa.Column('feedurl', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('feed_pages', sa.Column('srcname', sa.TEXT(), autoincrement=False, nullable=True))
    op.create_table('nu_outbound_wrappers',
    sa.Column('id', sa.BIGINT(), nullable=False),
    sa.Column('actual_target', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('client_id', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('client_key', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('groupinfo', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('outbound_wrapper', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('referrer', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('releaseinfo', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('seriesname', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('validated', sa.BOOLEAN(), autoincrement=False, nullable=True),
    sa.Column('released_on', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
    sa.PrimaryKeyConstraint('id', name='nu_outbound_wrappers_pkey'),
    sa.UniqueConstraint('client_id', 'client_key', 'seriesname', 'releaseinfo', 'groupinfo', 'actual_target', name='nu_outbound_wrappers_client_id_client_key_seriesname_releas_key')
    )
    ### end Alembic commands ### 
开发者ID:fake-name,项目名称:ReadableWebProxy,代码行数:22,代码来源:00030_be0687950ece_actually_dropping_unused_columns_now.py

示例2: downgrade

# 需要导入模块: import sqlalchemy [as 别名]
# 或者: from sqlalchemy import BIGINT [as 别名]
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('user', 'primary_blockchain_address')
    op.drop_column('user', 'is_public')
    op.add_column('transfer_account', sa.Column('balance', sa.BIGINT(), autoincrement=False, nullable=True))
    op.drop_constraint(None, 'transfer_account', type_='foreignkey')
    op.drop_column('transfer_account', 'is_public')
    op.drop_column('transfer_account', 'exchange_contract_id')
    op.drop_column('transfer_account', '_balance_wei')
    op.drop_column('email_whitelist', 'is_public')
    op.add_column('credit_transfer', sa.Column('transfer_amount', sa.INTEGER(), autoincrement=False, nullable=True))
    op.drop_column('credit_transfer', 'is_public')
    op.drop_column('credit_transfer', '_transfer_amount_wei')
    op.drop_column('blockchain_address', 'is_public')
    op.drop_table('exchange_contract_token_association_table')
    op.drop_index(op.f('ix_exchange_contract_contract_registry_blockchain_address'), table_name='exchange_contract')
    op.drop_index(op.f('ix_exchange_contract_blockchain_address'), table_name='exchange_contract')
    op.drop_table('exchange_contract')
    op.drop_table('exchange')
    # ### end Alembic commands ### 
开发者ID:teamsempo,项目名称:SempoBlockchain,代码行数:22,代码来源:e44e075decdf_.py

示例3: downgrade

# 需要导入模块: import sqlalchemy [as 别名]
# 或者: from sqlalchemy import BIGINT [as 别名]
def downgrade():
    op.create_table('job_statistics',
    sa.Column('id', postgresql.UUID(), autoincrement=False, nullable=False),
    sa.Column('job_id', postgresql.UUID(), autoincrement=False, nullable=False),
    sa.Column('emails_sent', sa.BIGINT(), autoincrement=False, nullable=False),
    sa.Column('emails_delivered', sa.BIGINT(), autoincrement=False, nullable=False),
    sa.Column('emails_failed', sa.BIGINT(), autoincrement=False, nullable=False),
    sa.Column('sms_sent', sa.BIGINT(), autoincrement=False, nullable=False),
    sa.Column('sms_delivered', sa.BIGINT(), autoincrement=False, nullable=False),
    sa.Column('sms_failed', sa.BIGINT(), autoincrement=False, nullable=False),
    sa.Column('letters_sent', sa.BIGINT(), autoincrement=False, nullable=False),
    sa.Column('letters_failed', sa.BIGINT(), autoincrement=False, nullable=False),
    sa.Column('created_at', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
    sa.Column('updated_at', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
    sa.Column('sent', sa.BIGINT(), autoincrement=False, nullable=True),
    sa.Column('delivered', sa.BIGINT(), autoincrement=False, nullable=True),
    sa.Column('failed', sa.BIGINT(), autoincrement=False, nullable=True),
    sa.ForeignKeyConstraint(['job_id'], ['jobs.id'], name='job_statistics_job_id_fkey'),
    sa.PrimaryKeyConstraint('id', name='job_statistics_pkey')
    ) 
开发者ID:alphagov,项目名称:notifications-api,代码行数:22,代码来源:0175_drop_job_statistics_table.py

示例4: downgrade

# 需要导入模块: import sqlalchemy [as 别名]
# 或者: from sqlalchemy import BIGINT [as 别名]
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('services_history', sa.Column('sms_sender', sa.VARCHAR(length=11), autoincrement=False, nullable=True))
    op.add_column('services', sa.Column('sms_sender', sa.VARCHAR(length=11), autoincrement=False, nullable=True))
    op.create_table('notification_statistics',
        sa.Column('id', postgresql.UUID(), autoincrement=False, nullable=False),
        sa.Column('service_id', postgresql.UUID(), autoincrement=False, nullable=False),
        sa.Column('emails_requested', sa.BIGINT(), autoincrement=False, nullable=False),
        sa.Column('emails_delivered', sa.BIGINT(), autoincrement=False, nullable=False),
        sa.Column('emails_failed', sa.BIGINT(), autoincrement=False, nullable=False),
        sa.Column('sms_requested', sa.BIGINT(), autoincrement=False, nullable=False),
        sa.Column('sms_delivered', sa.BIGINT(), autoincrement=False, nullable=False),
        sa.Column('sms_failed', sa.BIGINT(), autoincrement=False, nullable=False),
        sa.Column('day', sa.DATE(), autoincrement=False, nullable=False),
        sa.ForeignKeyConstraint(['service_id'], ['services.id'], name='notification_statistics_service_id_fkey'),
        sa.PrimaryKeyConstraint('id', name='notification_statistics_pkey'),
        sa.UniqueConstraint('service_id', 'day', name='uix_service_to_day')
    ) 
开发者ID:alphagov,项目名称:notifications-api,代码行数:20,代码来源:0141_remove_unused.py

示例5: downgrade

# 需要导入模块: import sqlalchemy [as 别名]
# 或者: from sqlalchemy import BIGINT [as 别名]
def downgrade():
    op.add_column('service_permissions',
                  sa.Column('updated_at', postgresql.TIMESTAMP(), autoincrement=False, nullable=True))
    op.create_table('template_statistics',
                    sa.Column('id', postgresql.UUID(), autoincrement=False, nullable=False),
                    sa.Column('service_id', postgresql.UUID(), autoincrement=False, nullable=False),
                    sa.Column('template_id', postgresql.UUID(), autoincrement=False, nullable=False),
                    sa.Column('usage_count', sa.BIGINT(), autoincrement=False, nullable=False),
                    sa.Column('day', sa.DATE(), autoincrement=False, nullable=False),
                    sa.Column('updated_at', postgresql.TIMESTAMP(), autoincrement=False, nullable=False),
                    sa.ForeignKeyConstraint(['service_id'], ['services.id'],
                                            name='template_statistics_service_id_fkey'),
                    sa.ForeignKeyConstraint(['template_id'], ['templates.id'],
                                            name='template_statistics_template_id_fkey'),
                    sa.PrimaryKeyConstraint('id', name='template_statistics_pkey')
                    ) 
开发者ID:alphagov,项目名称:notifications-api,代码行数:18,代码来源:0107_drop_template_stats.py

示例6: downgrade

# 需要导入模块: import sqlalchemy [as 别名]
# 或者: from sqlalchemy import BIGINT [as 别名]
def downgrade():
    print("Removing dns_providers_id foreign key on pending_certs table")
    op.drop_constraint(None, "pending_certs", type_="foreignkey")
    print("Reverting column types in the api_keys table")
    op.alter_column("api_keys", "user_id", existing_type=sa.INTEGER(), nullable=False)
    op.alter_column("api_keys", "ttl", existing_type=sa.BIGINT(), nullable=False)
    op.alter_column("api_keys", "revoked", existing_type=sa.BOOLEAN(), nullable=False)
    op.alter_column("api_keys", "issued_at", existing_type=sa.BIGINT(), nullable=False)
    print("Reverting certificates_dns_providers_fk foreign key")
    op.drop_constraint(
        "certificates_dns_providers_fk", "certificates", type_="foreignkey"
    )

    print("Dropping pending_dns_authorizations table")
    op.drop_table("pending_dns_authorizations")
    print("Undoing modifications to pending_certs table")
    op.drop_column("pending_certs", "options")
    op.drop_column("pending_certs", "dns_provider_id")
    print("Undoing modifications to certificates table")
    op.drop_column("certificates", "dns_provider_id")

    print("Deleting dns_providers table")
    op.drop_table("dns_providers") 
开发者ID:Netflix,项目名称:lemur,代码行数:25,代码来源:3adfdd6598df_.py

示例7: downgrade

# 需要导入模块: import sqlalchemy [as 别名]
# 或者: from sqlalchemy import BIGINT [as 别名]
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('guild_members',
    sa.Column('id', sa.INTEGER(), nullable=False),
    sa.Column('guild_id', sa.BIGINT(), autoincrement=False, nullable=False),
    sa.Column('user_id', sa.BIGINT(), autoincrement=False, nullable=False),
    sa.Column('username', sa.VARCHAR(length=255), autoincrement=False, nullable=False),
    sa.Column('discriminator', sa.INTEGER(), autoincrement=False, nullable=False),
    sa.Column('nickname', sa.VARCHAR(length=255), autoincrement=False, nullable=True),
    sa.Column('avatar', sa.VARCHAR(length=255), autoincrement=False, nullable=True),
    sa.Column('active', sa.BOOLEAN(), server_default=sa.text('true'), autoincrement=False, nullable=False),
    sa.Column('banned', sa.BOOLEAN(), server_default=sa.text('false'), autoincrement=False, nullable=False),
    sa.Column('roles', sa.TEXT(), autoincrement=False, nullable=False),
    sa.PrimaryKeyConstraint('id', name='idx_25210_primary')
    )
    # ### end Alembic commands ### 
开发者ID:TitanEmbeds,项目名称:Titan,代码行数:18,代码来源:1d2c2dc41e86_removed_guild_members_table.py

示例8: downgrade

# 需要导入模块: import sqlalchemy [as 别名]
# 或者: from sqlalchemy import BIGINT [as 别名]
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('messages',
    sa.Column('guild_id', sa.BIGINT(), autoincrement=False, nullable=False),
    sa.Column('channel_id', sa.BIGINT(), autoincrement=False, nullable=False),
    sa.Column('message_id', sa.BIGINT(), autoincrement=False, nullable=False),
    sa.Column('content', sa.TEXT(), autoincrement=False, nullable=False),
    sa.Column('author', sa.TEXT(), autoincrement=False, nullable=False),
    sa.Column('timestamp', postgresql.TIMESTAMP(), autoincrement=False, nullable=False),
    sa.Column('edited_timestamp', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
    sa.Column('mentions', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('attachments', sa.TEXT(), autoincrement=False, nullable=True),
    sa.Column('embeds', sa.TEXT(), autoincrement=False, nullable=True),
    sa.PrimaryKeyConstraint('message_id', name='messages_pkey')
    )
    # ### end Alembic commands ### 
开发者ID:TitanEmbeds,项目名称:Titan,代码行数:18,代码来源:52271b243ba2_remove_messages_table_for_good.py

示例9: downgrade

# 需要导入模块: import sqlalchemy [as 别名]
# 或者: from sqlalchemy import BIGINT [as 别名]
def downgrade():
    op.add_column('kernels', sa.Column('mem_cur_bytes', sa.BIGINT(), autoincrement=False, nullable=True))
    op.drop_column('kernels', 'io_max_scratch_size') 
开发者ID:lablup,项目名称:backend.ai-manager,代码行数:5,代码来源:4545f5c948b3_add_io_scratch_size_stats.py

示例10: downgrade

# 需要导入模块: import sqlalchemy [as 别名]
# 或者: from sqlalchemy import BIGINT [as 别名]
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###

    op.add_column('web_pages_version', sa.Column('end_transaction_id', sa.BIGINT(), autoincrement=False, nullable=True))
    op.add_column('rss_parser_funcs_version', sa.Column('end_transaction_id', sa.BIGINT(), autoincrement=False, nullable=True))
    op.create_index('ix_rss_parser_funcs_version_end_transaction_id', 'rss_parser_funcs_version', ['end_transaction_id'], unique=False)
    op.add_column('rss_parser_feed_name_lut_version', sa.Column('end_transaction_id', sa.BIGINT(), autoincrement=False, nullable=True))
    op.create_index('ix_rss_parser_feed_name_lut_version_end_transaction_id', 'rss_parser_feed_name_lut_version', ['end_transaction_id'], unique=False)
    op.add_column('raw_web_pages_version', sa.Column('end_transaction_id', sa.BIGINT(), autoincrement=False, nullable=True))

    # ### end Alembic commands ### 
开发者ID:fake-name,项目名称:ReadableWebProxy,代码行数:13,代码来源:00046_4f22490b9071_experimenting_with_versioning_modes.py

示例11: upgrade

# 需要导入模块: import sqlalchemy [as 别名]
# 或者: from sqlalchemy import BIGINT [as 别名]
def upgrade():
	### commands auto generated by Alembic - please adjust! ###

	bind = op.get_bind()
	sess = Session(bind=bind)


	# create the teams table and the players.team_id column
	# RssFeedPost.__table__.create(bind)
	# RssFeedEntry.__table__.create(bind)

	name_map = sess.query(RssFeedEntry).all()
	name_map = {row.feed_name : row.id for row in name_map}

	feednames = sess.query(RssFeedPost.srcname).group_by(RssFeedPost.srcname).all()
	for feedname, in feednames:
		if not feedname in name_map:
			print(feedname)
		else:
			sess.query(RssFeedPost).filter(RssFeedPost.srcname == feedname).update({"feed_id" : name_map[feedname]})
			print("Updating for {} -> {}".format(feedname, name_map[feedname]))

	sess.commit()

	null_rows = sess.query(RssFeedPost.srcname).filter(RssFeedPost.feed_id == None).all()
	print(null_rows)

	op.alter_column('feed_pages', 'feed_id',
			   existing_type=sa.BIGINT(),
			   nullable=False)
	### end Alembic commands ### 
开发者ID:fake-name,项目名称:ReadableWebProxy,代码行数:33,代码来源:00034_3389071120cb_rss_foreign_key_bits.py

示例12: downgrade

# 需要导入模块: import sqlalchemy [as 别名]
# 或者: from sqlalchemy import BIGINT [as 别名]
def downgrade():
	### commands auto generated by Alembic - please adjust! ###
	op.alter_column('feed_pages', 'feed_id',
			   existing_type=sa.BIGINT(),
			   nullable=True)
	### end Alembic commands ### 
开发者ID:fake-name,项目名称:ReadableWebProxy,代码行数:8,代码来源:00034_3389071120cb_rss_foreign_key_bits.py

示例13: downgrade

# 需要导入模块: import sqlalchemy [as 别名]
# 或者: from sqlalchemy import BIGINT [as 别名]
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('transfer_account', sa.Column('balance', sa.BIGINT(), autoincrement=False, nullable=True))
    # ### end Alembic commands ### 
开发者ID:teamsempo,项目名称:SempoBlockchain,代码行数:6,代码来源:ace761cd04c1_.py

示例14: downgrade

# 需要导入模块: import sqlalchemy [as 别名]
# 或者: from sqlalchemy import BIGINT [as 别名]
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('blockchain_wallet', sa.Column('wei_topup_amount', sa.BIGINT(), autoincrement=False, nullable=True))
    op.drop_column('blockchain_wallet', 'wei_topup_target')
    # ### end Alembic commands ### 
开发者ID:teamsempo,项目名称:SempoBlockchain,代码行数:7,代码来源:b1d4118a005b_.py

示例15: downgrade

# 需要导入模块: import sqlalchemy [as 别名]
# 或者: from sqlalchemy import BIGINT [as 别名]
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('blockchain_task', sa.Column('gasLimit', sa.BIGINT(), autoincrement=False, nullable=True))
    op.drop_column('blockchain_task', 'gas_limit')
    # ### end Alembic commands ### 
开发者ID:teamsempo,项目名称:SempoBlockchain,代码行数:7,代码来源:5d327a0b562f_.py


注:本文中的sqlalchemy.BIGINT属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。