Constraints

37 Foreign Key Constraints

Constraint Name Child Column Parent Column Delete Rule
token_instances_token_contract_address_hash_fkey
token_instances.token_contract_address_hash
tokens.contract_address_hash
Restrict delete
address_coin_balances_address_hash_fkey
address_coin_balances.address_hash
addresses.hash
Restrict delete
tokens_contract_address_hash_fkey
tokens.contract_address_hash
addresses.hash
Cascade on delete
logs_block_hash_fkey
logs.block_hash
blocks.hash
Restrict delete
logs_address_hash_fkey
logs.address_hash
addresses.hash
Cascade on delete
logs_transaction_hash_fkey
logs.transaction_hash
transactions.hash
Cascade on delete
transactions_from_address_hash_fkey
transactions.from_address_hash
addresses.hash
Cascade on delete
transactions_block_hash_fkey
transactions.block_hash
blocks.hash
Cascade on delete
transactions_created_contract_address_hash_fkey
transactions.created_contract_address_hash
addresses.hash
Restrict delete
transactions_to_address_hash_fkey
transactions.to_address_hash
addresses.hash
Cascade on delete
internal_transactions_transaction_hash_fkey
internal_transactions.transaction_hash
transactions.hash
Cascade on delete
internal_transactions_from_address_hash_fkey
internal_transactions.from_address_hash
addresses.hash
Restrict delete
internal_transactions_created_contract_address_hash_fkey
internal_transactions.created_contract_address_hash
addresses.hash
Restrict delete
internal_transactions_to_address_hash_fkey
internal_transactions.to_address_hash
addresses.hash
Restrict delete
internal_transactions_block_hash_fkey
internal_transactions.block_hash
blocks.hash
Restrict delete
token_transfers_from_address_hash_fkey
token_transfers.from_address_hash
addresses.hash
Restrict delete
token_transfers_token_contract_address_hash_fkey
token_transfers.token_contract_address_hash
addresses.hash
Restrict delete
token_transfers_block_hash_fkey
token_transfers.block_hash
blocks.hash
Restrict delete
token_transfers_to_address_hash_fkey
token_transfers.to_address_hash
addresses.hash
Restrict delete
token_transfers_transaction_hash_fkey
token_transfers.transaction_hash
transactions.hash
Cascade on delete
administrators_user_id_fkey
administrators.user_id
users.id
Cascade on delete
transaction_forks_hash_fkey
transaction_forks.hash
transactions.hash
Cascade on delete
transaction_forks_uncle_hash_fkey
transaction_forks.uncle_hash
blocks.hash
Cascade on delete
address_coin_balances_daily_address_hash_fkey
address_coin_balances_daily.address_hash
addresses.hash
Restrict delete
pending_block_operations_block_hash_fkey
pending_block_operations.block_hash
blocks.hash
Cascade on delete
address_token_balances_token_contract_address_hash_fkey
address_token_balances.token_contract_address_hash
tokens.contract_address_hash
Restrict delete
address_token_balances_address_hash_fkey
address_token_balances.address_hash
addresses.hash
Restrict delete
block_rewards_address_hash_fkey
block_rewards.address_hash
addresses.hash
Cascade on delete
block_rewards_block_hash_fkey
block_rewards.block_hash
blocks.hash
Cascade on delete
decompiled_smart_contracts_address_hash_fkey
decompiled_smart_contracts.address_hash
addresses.hash
Cascade on delete
block_second_degree_relations_nephew_hash_fkey
block_second_degree_relations.nephew_hash
blocks.hash
Restrict delete
smart_contracts_additional_sources_address_hash_fkey
smart_contracts_additional_sources.address_hash
smart_contracts.address_hash
Cascade on delete
blocks_miner_hash_fkey
blocks.miner_hash
addresses.hash
Restrict delete
address_current_token_balances_token_contract_address_hash_fkey
address_current_token_balances.token_contract_address_hash
tokens.contract_address_hash
Restrict delete
address_current_token_balances_address_hash_fkey
address_current_token_balances.address_hash
addresses.hash
Restrict delete
user_contacts_user_id_fkey
user_contacts.user_id
users.id
Cascade on delete
smart_contracts_address_hash_fkey
smart_contracts.address_hash
addresses.hash
Cascade on delete

Check Constraints

Table Constraint Name Constraint
transactions collated_block_number (((block_hash IS NULL) OR (block_number IS NOT NULL)))
transactions collated_cumalative_gas_used (((block_hash IS NULL) OR (cumulative_gas_used IS NOT NULL)))
transactions collated_gas_used (((block_hash IS NULL) OR (gas_used IS NOT NULL)))
transactions collated_index (((block_hash IS NULL) OR (index IS NOT NULL)))
transactions error (((status = 0) OR ((status <> 0) AND (error IS NULL))))
transactions pending_block_number (((block_hash IS NOT NULL) OR (block_number IS NULL)))
transactions pending_cumalative_gas_used (((block_hash IS NOT NULL) OR (cumulative_gas_used IS NULL)))
transactions pending_gas_used (((block_hash IS NOT NULL) OR (gas_used IS NULL)))
transactions pending_index (((block_hash IS NOT NULL) OR (index IS NULL)))
transactions status ((((block_hash IS NULL) AND (status IS NULL)) OR (block_hash IS NOT NULL) OR ((status = 0) AND ((error)::text = 'dropped/replaced'::text))))
internal_transactions call_has_call_type ((((type)::text <> 'call'::text) OR (call_type IS NOT NULL))) NOT VALID
internal_transactions call_has_error_or_result ((((type)::text <> 'call'::text) OR ((gas IS NOT NULL) AND (((error IS NULL) AND (gas_used IS NOT NULL) AND (output IS NOT NULL)) OR ((error IS NOT NULL) AND (gas_used IS NULL) AND (output IS NULL))))))
internal_transactions call_has_input ((((type)::text <> 'call'::text) OR (input IS NOT NULL))) NOT VALID
internal_transactions create_has_error_or_result ((((type)::text <> 'create'::text) OR ((gas IS NOT NULL) AND (((error IS NULL) AND (created_contract_address_hash IS NOT NULL) AND (created_contract_code IS NOT NULL) AND (gas_used IS NOT NULL)) OR ((error IS NOT NULL) AND (created_contract_address_hash IS NULL) AND (created_contract_code IS NULL) AND (gas_used IS NULL))))))
internal_transactions create_has_init ((((type)::text <> 'create'::text) OR (init IS NOT NULL))) NOT VALID
internal_transactions selfdestruct_has_from_and_to_address ((((type)::text <> 'selfdestruct'::text) OR ((from_address_hash IS NOT NULL) AND (gas IS NULL) AND (to_address_hash IS NOT NULL)))) NOT VALID