Constraints

29 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
account_tag_transactions_identity_id_fkey
account_tag_transactions.identity_id
account_identities.id
Cascade on delete
logs_block_hash_fkey
logs.block_hash
blocks.hash
Restrict delete
logs_transaction_hash_fkey
logs.transaction_hash
transactions.hash
Cascade on delete
account_public_tags_requests_identity_id_fkey
account_public_tags_requests.identity_id
account_identities.id
Restrict delete
token_transfers_block_hash_fkey
token_transfers.block_hash
blocks.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
pending_block_operations_block_hash_fkey
pending_block_operations.block_hash
blocks.hash
Cascade on delete
account_api_keys_identity_id_fkey
account_api_keys.identity_id
account_identities.id
Cascade on delete
smart_contracts_additional_sources_address_hash_fkey
smart_contracts_additional_sources.address_hash
smart_contracts.address_hash
Cascade on delete
account_watchlist_addresses_watchlist_id_fkey
account_watchlist_addresses.watchlist_id
account_watchlists.id
Cascade on delete
address_to_tags_tag_id_fkey
address_to_tags.tag_id
address_tags.id
Restrict delete
account_tag_addresses_identity_id_fkey
account_tag_addresses.identity_id
account_identities.id
Cascade on delete
account_custom_abis_identity_id_fkey
account_custom_abis.identity_id
account_identities.id
Cascade on delete
user_contacts_user_id_fkey
user_contacts.user_id
users.id
Cascade on delete
transaction_actions_hash_fkey
transaction_actions.hash
transactions.hash
Cascade on delete
transactions_block_hash_fkey
transactions.block_hash
blocks.hash
Cascade on delete
internal_transactions_transaction_hash_fkey
internal_transactions.transaction_hash
transactions.hash
Cascade on delete
internal_transactions_block_hash_fkey
internal_transactions.block_hash
blocks.hash
Restrict delete
account_watchlists_identity_id_fkey
account_watchlists.identity_id
account_identities.id
Cascade on delete
account_identities_plan_id_fkey
account_identities.plan_id
account_api_plans.id
Restrict delete
block_rewards_block_hash_fkey
block_rewards.block_hash
blocks.hash
Cascade on delete
block_second_degree_relations_nephew_hash_fkey
block_second_degree_relations.nephew_hash
blocks.hash
Restrict delete
proxy_smart_contract_verification_statuses_contract_address_has
proxy_smart_contract_verification_statuses.contract_address_hash
smart_contracts.address_hash
Cascade on delete
withdrawals_block_hash_fkey
withdrawals.block_hash
blocks.hash
Cascade on delete
smart_contract_audit_reports_address_hash_fkey
smart_contract_audit_reports.address_hash
smart_contracts.address_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_price (((block_hash IS NULL) OR (gas_price 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 (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