`public.packages` view should take `app.package_upgrades` into account as well for its latest_version column.
还没有人认领这个 Issue。
评估
调研方向
定位 public.packages 视图的定义,并检查 app.package_versions 和 app.package_upgrades 如何提供版本值。使用 my_ext--1.0.0.sql 和 my_ext--1.0.0--2.0.0.sql 重现,然后验证 latest_version 报告的是 2.0.0 而不是 1.0.0。
由索引模型根据 Issue 内容生成。
描述
Currently the public.packages view is defined like this:
create or replace view public.packages as
select
pa.id,
pa.package_name,
pa.handle,
pa.partial_name,
newest_ver.version as latest_version,
newest_ver.description_md,
pa.control_description,
pa.control_requires,
pa.created_at,
pa.default_version
from
app.packages pa,
lateral (
select *
from app.package_versions pv
where pv.package_id = pa.id
order by pv.version_struct desc
limit 1
) newest_ver;
Notice how in the lateral clause only app.package_versions are read but there's no app.package_upgrades. This results in the latest version being returned as less if there is one base version with an upgrade.
To reproduce publish an extension with my_ext--1.0.0.sql and my_ext--1.0.0--2.0.0.sql files and notice how the latest version reported is 1.0.0.
To fix, the view should take the maximum version from among the app.package_versions's version column and app.package_upgrade's to_version column.
- 主要语言
- TypeScript
- 星标
- 442
- 派生
- 31
- 平均合并
- 1 小时 22 分钟
- 30 天内合并 PR
- 9
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
supabase/dbdev 的其他 Issue
-
documentation
难度 1/5 1-3 小时 新手友好度 68/100
-
难度 4/5 3-5 天 新手友好度 45/100
-
难度 5/5 一周以上 新手友好度 35/100
-
extensions page to list all extensions可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 5/5 一周以上 新手友好度 25/100
-
难度 4/5 3-5 天 新手友好度 35/100
相似的 Issue
-
Dependencies view: `getParent` loops forever on untitled documents, extension host runs out of memory可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭bug
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
bug
难度 2/5 1 小时以内 新手友好度 82/100
awslabs/visual-asset-management-system#413 ·
维护者通常 1 天内回复
-
bug confirmed perf
难度 2/5 1-3 小时 新手友好度 72/100
videojs/video.js#9400 · 1 条评论 ·
维护者通常 1 天内回复
-
bug pending triage scope/agent
难度 1/5 1 小时以内 新手友好度 82/100
维护者通常 1 天内回复
-
good first issue hacktoberfest
难度 2/5 半天 新手友好度 70/100
HelpCode-ai/anythingmcp#996 ·
维护者通常 1 天内回复