# 迁移问题：无法删除函数 delete\_user\_password()，因为其他对象依赖它

**URL:** https://meta.discourse.org/t/migration-trouble-due-to-stopping-a-restore-before-it-finished/373630
**Category:** Support
**Created:** [2025年七月9日 19:45 UTC](https://meta.discourse.org/t/migration-trouble-due-to-stopping-a-restore-before-it-finished/373630 "2025-07-09T19:45:29Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [2025年七月9日 21:37 UTC](https://meta.discourse.org/t/migration-trouble-due-to-stopping-a-restore-before-it-finished/373630/3 "2025-07-09T21:37:49Z")

</div>

> [@pfaffman](#):
>
> ```plaintext
> == 20240910090759 MakePasswordColumnsFromUsersReadOnly: migrating =============
> -- DROP TRIGGER IF EXISTS users_password_sync_on_delete_password ON users
> -- DROP FUNCTION IF EXISTS delete_user_password
> 
> DETAIL: trigger users_password_sync_on_delete_password on
> table backup.users depends on function delete_user_password()
> 
> ```

您在 `backup` schema（备份/恢复期间使用）中有表依赖于此函数。

这里的 `backup` schema 是否已过时？如果是，您可能只需要在此处 `DROP SCHEMA backup` 来摆脱它。

---

_[View the full topic](https://meta.discourse.org/t/migration-trouble-due-to-stopping-a-restore-before-it-finished/373630)._
