Properties with underscores in their name cannot be indexed
还没有人认领这个 Issue。
评估
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- javascript, postgresql
- 领域
- databases
调研方向
从 migration.js 大约第 777 行开始,使用包含下划线的属性复现报告中的模型设置,然后调用 pg.autoupdate()。验证现有索引在迁移后仍然保留,并确认属性名称包含下划线时能够正确匹配。
由索引模型根据 Issue 内容生成。
描述
Steps to reproduce
- create a model with a property name that contains an underscore in it (e.g. short_name).
- set that property to be indexed (e.g.
"index": true) - call
pg.autoupdate()(e.g. whereapp.datasources.pg);
Current Behavior
- The index is added
- Then the index is dropped
Expected Behavior
- The index is added
Additional information
The bug shown here is a bad regular expression in migration.js (on or about line 777):
const propNameRegEx = new RegExp('^' + self.table(model) + '_([^_]+)_idx');
The simple fix is:
const propNameRegEx = new RegExp('^' + self.table(model) + '_(.*)(?:_idx)$');
- 主要语言
- JavaScript
- 星标
- 118
- 派生
- 183
- 平均合并
- 3 天 7 小时
- 30 天内合并 PR
- 9
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
loopbackio/loopback-connector-postgresql 的其他 Issue
-
Partial JSON Update可能已有人在做 @vaibhavbhalla2505 于 264 天前认领。 未关闭feature
难度 5/5 一周以上 新手友好度 20/100
-
bug
难度 4/5 3-5 天 新手友好度 30/100
loopbackio/loopback-connector-postgresql#748 · 1 条评论 ·
-
bug
难度 3/5 1-2 天 新手友好度 38/100
-
bug
难度 4/5 3-5 天 新手友好度 25/100
-
bug
难度 2/5 1-3 小时 新手友好度 45/100
loopbackio/loopback-connector-postgresql#732 · 1 条评论 ·
查看 loopbackio/loopback-connector-postgresql 的全部 Issue
相似的 Issue
-
chore v2
难度 2/5 1-3 小时 新手友好度 78/100
modelcontextprotocol/servers#5115 ·
维护者通常 1 天内回复
-
beginner bug good first issue
难度 1/5 1 小时以内 新手友好度 85/100
philaconvalley/website#168 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
druxt/umami.demo.druxtjs.org#527 ·
维护者通常 9 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
NuSkooler/enigma-bbs#907 ·
维护者通常 1 天内回复
-
documentation good first issue
难度 2/5 1-3 小时 新手友好度 72/100