Skip to content

Instantly share code, notes, and snippets.

@romulostorel
Created July 18, 2013 12:47
Show Gist options
  • Save romulostorel/6029028 to your computer and use it in GitHub Desktop.
Save romulostorel/6029028 to your computer and use it in GitHub Desktop.
PG::Error: ERROR: cannot drop table compras_bank_accounts because other objects depend on it
DETAIL: constraint cbar_cba_fk on table compras_bank_account_capabilities depends on table compras_bank_accounts
constraint compras_account_movements_bank_account_id_fk on table compras_account_movements depends on table compras_bank_accounts
constraint compras_agreement_bank_accounts_bank_account_id_fk on table compras_agreement_bank_accounts depends on table compras_bank_accounts
constraint compras_bank_reconciliation_items_bank_account_id_fk on table compras_bank_reconciliation_items depends on table compras_bank_accounts
constraint compras_bank_reconciliations_bank_account_id_fk on table compras_bank_reconciliations depends on table compras_bank_accounts
constraint compras_bank_transfers_bank_account_id_fk on table compras_bank_transfers depends on table compras_bank_accounts
constraint compras_bank_transfers_deposit_bank_account_id_fk on table compras_bank_transfers depends on table compras_bank_accounts
constraint compras_checkbooks_bank_account_id_fk on table compras_checkbooks depends on table compras_bank_accounts
constraint compras_extra_budget_pledge_payments_bank_account_id_fk on table compras_extra_budget_pledge_payments depends on table compras_bank_accounts
constraint compras_pledge_liquidation_parcel_payers_bank_account_id_fk on table compras_pledge_liquidation_parcel_payers depends on table compras_bank_accounts
constraint compras_tax_revenues_bank_account_id_fk on table compras_tax_revenues depends on table compras_bank_accounts
HINT: Use DROP ... CASCADE to drop the dependent objects too.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment