GenieFramework / GenieFramework/SearchLightSQLite.jl

Allow remove_column (now supported by SQLite)

Open
#7 1 comment 0 reactions 0 assignees View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.