Found simple solution - renaming table.
Algorithm is pretty simple:
- Rename table to another table, e.g. "table" to "table-backup" (references will refer to that backup table)
- Create "table" from "table-backup" ("table" will not have any dependencies)
- Perform any actions in the application
- Drop "table" with dirty data (will not break references integrity)
- Rename "table-backup" to "table" (references integrity will be kept).
Thanks