GenieFramework / GenieFramework/SearchLightSQLite.jl
Allow remove_column (now supported by SQLite)
- Dominant language
- Julia
- Stars
- 3
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
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?
```julia
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?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.