當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。