Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deleting Customers and/or Orders from the Demo App throws an exception #738

Closed
nickcharlton opened this issue Jan 20, 2017 · 0 comments · Fixed by #739
Closed

Deleting Customers and/or Orders from the Demo App throws an exception #738

nickcharlton opened this issue Jan 20, 2017 · 0 comments · Fixed by #739

Comments

@nickcharlton
Copy link
Member

https://sentry.io/thoughtbot-6l/administrate/issues/207094470/

PG::ForeignKeyViolation: ERROR:  update or delete on table "customers" violates foreign key constraint "fk_rails_99d97e3ae6" on table "orders"
DETAIL:  Key (id)=(14627) is still referenced from table "orders".

  active_record/connection_adapters/postgresql_adapter.rb:598:in `async_exec'
    log(sql, name, binds) { @connection.async_exec(sql, type_casted_binds) }
  active_record/connection_adapters/postgresql_adapter.rb:598:in `block in exec_no_cache'
    log(sql, name, binds) { @connection.async_exec(sql, type_casted_binds) }
  active_record/connection_adapters/abstract_adapter.rb:589:in `block in log'
    :binds          => binds) { yield }
  active_support/notifications/instrumenter.rb:21:in `instrument'
    yield payload
  active_record/connection_adapters/abstract_adapter.rb:583:in `log'
    @instrumenter.instrument(
...
(110 additional frame(s) were not displayed)

ActiveRecord::InvalidForeignKey: PG::ForeignKeyViolation: ERROR:  update or delete on table "customers" violates foreign key constraint "fk_rails_99d97e3ae6" on table "orders"
DETAIL:  Key (id)=(14627) is still referenced from table "orders".
: DELETE FROM "customers" WHERE "customers"."id" = $1

ActiveRecord::InvalidForeignKey: PG::ForeignKeyViolation: ERROR:  update or delete on table "customers" violates foreign key constraint "fk_rails_99d97e3ae6" on table "orders"
DETAIL:  Key (id)=(14627) is still referenced from table "orders".
: DELETE FROM "customers" WHERE "customers"."id" = $1
nickcharlton added a commit that referenced this issue Jan 20, 2017
This fixes #738, where foreign key constrains were violated trying out
the deletion in the demo app.
BenMorganIO pushed a commit that referenced this issue Jan 20, 2017
This fixes #738, where foreign key constrains were violated trying out
the deletion in the demo app.
nickcharlton added a commit that referenced this issue Jan 25, 2017
fwolfst pushed a commit to fwolfst/administrate that referenced this issue Mar 8, 2017
This fixes thoughtbot#738, where foreign key constrains were violated trying out
the deletion in the demo app.
fwolfst pushed a commit to fwolfst/administrate that referenced this issue Mar 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant