You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DROP SQL instructions with CASCADE modifier are danger, can cause the deletion of objects that were not planned to delete. Currently there are other views in the DBs were we use medic-couch2pg to manage the "main" schema, but other schema changes are manage outside this tool, and we suffered the consequences of the DROP instructions loosing views that the scripts didn't intend to delete, but if we instead of use CASCADE we drop in the script one by one the views and objects that we know we want to delete, the error can be prevented.
Although add a note in the README may be enough, to better prevent to happen again, we should add a linter or a unit test that verifies that CASCADE is not used in future scripts addition.
The text was updated successfully, but these errors were encountered:
This is a spin-off of this comment:
DROP
SQL instructions withCASCADE
modifier are danger, can cause the deletion of objects that were not planned to delete. Currently there are other views in the DBs were we use medic-couch2pg to manage the "main" schema, but other schema changes are manage outside this tool, and we suffered the consequences of theDROP
instructions loosing views that the scripts didn't intend to delete, but if we instead of useCASCADE
we drop in the script one by one the views and objects that we know we want to delete, the error can be prevented.Although add a note in the README may be enough, to better prevent to happen again, we should add a linter or a unit test that verifies that
CASCADE
is not used in future scripts addition.The text was updated successfully, but these errors were encountered: