Opened 7 years ago

Closed 7 years ago

#7731 closed (duplicate)

PostgreSQL requires DROP ... CASCADE when reseting app on which other apps depend

Reported by: dp_wiz Owned by: nobody
Component: Database layer (models, ORM) Version: master
Severity: Keywords: yandex-sprint
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


psql output (sql&error dump):
Test project:

I dumped data from app and tried to reset it, got failure message complaining about dependent objects with a hint for CASCADE. But there's no way to ask reset code to [automatically] produce a SQL with CASCADE code.

Reset code should temporarily disable (drop?) constraint for that dependent application and reenable(recreate) it afterwards.

Change History (2)

comment:1 Changed 7 years ago by dp_wiz

  • Keywords yandex-sprint added
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 7 years ago by russellm

  • Resolution set to duplicate
  • Status changed from new to closed

This is essentially a duplicate of #2493. reset (and sqlreset) are known to have some pretty major problems caused by constraints, and these problems aren't Postgres specific. Fixing these problems is not a trivial operation, either.

Note: See TracTickets for help on using tickets.
Back to Top