Allow remove_column (now supported by SQLite)
还没有人认领这个 Issue。
评估
调研方向
从 SearchLight.Migration.remove_column 入口点开始,结合 issue 中链接的 SQLite ALTER TABLE DROP COLUMN 文档,检查它如何使用 SearchLight.query。完成标准是 SQLite 适配器支持删除列,并适当地处理相关的数据库失败;issue 中未指定测试文件。
由索引模型根据 Issue 内容生成。
描述
From what I see, SQLite now supports ALTER TABLE DROP COLUMN: https://sqlite.org/lang_altertable.html#altertabdropcol
remove_column would probably look like this then?
function SearchLight.Migration.remove_column(table_name::Union{String,Symbol},
name::Union{String,Symbol}, options::Union{String,Symbol} = "") :: Nothing
SearchLight.query("ALTER TABLE `$table_name` DROP COLUMN `$name` $options")
nothing
end
I am very new to database stuff; maybe the possible failures reasons (like column being unique, or an index) should be checked in the function?
- 主要语言
- Julia
- 星标
- 3
- 派生
- 4
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 66/100
-
enhancement
难度 2/5 1-3 小时 新手友好度 65/100
oscar-system/Oscar.jl#6572 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
-
难度 2/5 1-3 小时 新手友好度 66/100
-
question
难度 2/5 1-3 小时 新手友好度 68/100
brown-ccv/Chamber.jl#272 ·