postgresql - 无法通过 CLI 将本地迁移推送到 Supabase

标签 postgresql supabase supabase-database

我尝试使用命令 supabase db push 通过它的 cli 将本地迁移推送到 supabase 数据库.它向我显示的错误是:

Error: ERROR: must be owner of table users (SQLSTATE 42501)

我已经用 supabase db remote set 'postgresql://postgres:<your_password>@db.<your_project_ref>.supabase.co:5432/postgres' 设置了 cli根据 GitHub repository 中的自述文件.

我可以获得有关如何推送本地更改的帮助吗?

最佳答案

如果您有从仪表板创建的表,通常会发生这种情况。要手动解决它,您可以在 SQL 编辑器上运行它:

alter table users owner to postgres;

我们 (Supabase) 正在对平台进行更改,因此您无需手动执行这些步骤。

另请参阅:https://github.com/supabase/cli/issues/128

关于postgresql - 无法通过 CLI 将本地迁移推送到 Supabase,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71204117/

相关文章:

postgresql - 使用持久数据运行 postgresql docker 镜像返回权限错误

postgresql - 为什么 AWS RDS 备份需要这么长时间?

performance - PostgreSQL 中的多行与多列与数组

javascript - 使用 supabase 计算 DISTINCT 值的出现次数

database - pg_hba.conf 中用于远程访问 postgresql 的 IP 范围

supabase - 如何更新 Supabase 表中的整行? (出现 400 错误)

smtp - Supabase 从自定义 SMTP 设置返回多个错误?

postgresql - 如何使用 pgvector 修复 Postgres 错误 "operator does not exist"

javascript - 如何使用 Supabase 中的 signUp() 方法在注册时添加其他用户信息

reactjs - 在 supabase js 查询中获取计数并指定范围