7 ms·
I wish someone would write a set of shell scripts that overcome the hardships when dealing with SQLite databases. For example, deleting a column is a pain in t
by TicklishTiger 5y ago
I wish someone would write a set of shell scripts that overcome the hardships when dealing with SQLite databases.
For example, deleting a column is a pain in the ass.
A single purpose script "rename_column.sh" would be nice, which combines all necessary steps and gives some guidance regarding edge cases.
- antimatter15 5y agoThe latest version (3.35.4) adds `ALTER TABLE DROP COLUMN` https://sqlite.org/releaselog/3_35_4.html https://sqlite.org/releaselog/3_35_4.html
- TicklishTiger 5y agoThat is cool. What is a good way to use 3.35.4 on a system with a Debian version that comes with an older SQLite version?
- feinte 5y agoCompiling it yourself from source is quite easy, you can find instruction here: https://www.sqlite.org/howtocompile.html https://www.sqlite.org/howtocompile.html Here is an article from Julia Evans explaining it: https://jvns.ca/blog/2019/10/28/sqlite-is-really-easy-to-compile/ https://jvns.ca/blog/2019/10/28/sqlite-is-really-easy-to-com... Or if you are familiar with Docker, you can use a more recent Debian in a container and install sqlite inside it.
- TicklishTiger 5y agoIf you compile it yourself, how do security updates get to your system? As for a more recent Debian version: The latest stable Debian has sqlite3 3.27.2 in the repos, so that is not an option.
- xorcist 5y agoSince sqlite is local to your application, you can just bundle a newer version. Speaking generally, if the Debian version is the way to go, the easiest way is often to grab the source package from sid and build it. It's literally just one command. Sometimes new dependencies will cause trouble, in which case some manual tinkering is required.
- deleted 5y ago[deleted]
- erikcw 5y agoI've gotten some good mileage out of sqlite-utils[0] lately. It and it's parent project datasette[1] are a wonderful contribution to the sqlite community. [0] https://sqlite-utils.datasette.io/en/stable/cli.html#transforming-tables https://sqlite-utils.datasette.io/en/stable/cli.html#transfo... [1] https://datasette.io/ https://datasette.io/