Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delete column from table #129

Closed
pishguy opened this issue Sep 1, 2019 · 3 comments
Closed

delete column from table #129

pishguy opened this issue Sep 1, 2019 · 3 comments

Comments

@pishguy
Copy link

pishguy commented Sep 1, 2019

is any solution about deleting column from table?

@simolus3
Copy link
Owner

simolus3 commented Sep 1, 2019

Same as #128 (comment), I'm afraid. There's no builtin support from sqlite for this, so you would need to do that manually.

@simolus3 simolus3 closed this as completed Sep 1, 2019
@dvoloshyn
Copy link

@simolus3, Not sure when sqlite added it but it seems to support column dropping now: https://sqlite.org/lang_altertable.html#altertabdropcol
Is it possible to add the native support for this?
For now I'm using the following code:

const dropTargetValue = "ALTER TABLE items DROP COLUMN targetValue";
m.database.customStatement(dropTargetValue);

@simolus3
Copy link
Owner

simolus3 commented Jun 8, 2024

DROP COLUMN was added in sqlite3 3.35.0, I've added a dropColumn method to the migrator API in 8427a18.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants