News for hackers. Stuff that matters.
Re:Dqlite – High-Availability SQLite by Dowwie on Friday August 30, 2019 @09:09AM (#20838179)
That's a hell of a reason not to use sqlite. Staging data in a temporary table while a table is dropped, recreated, and then data is reinserted is not much of an inconvenience.
Re:Dqlite – High-Availability SQLite by FreeHugs on Friday August 30, 2019 @11:54AM (#20839777)
It is. It is a bunch of complex commands. Just look at the proposed solutions on Stackoverflow:

https://stackoverflow.com/questions/8442147/how-to-delete-or...

Re:Dqlite – High-Availability SQLite by Dowwie on Friday August 30, 2019 @01:12PM (#20840479)
So I'll keep my opinion about this out of this response. To those who are interested, the approved answer on that SO thread recommends:

    1. create new table as the one you are trying to change
    2. copy all data,
    3. drop old table,
    4. rename the new one.
It's up to others to decide whether that is complex enough to warrant avoiding sqlite
Re:Dqlite – High-Availability SQLite by Someone on Friday August 30, 2019 @03:33PM (#20841814)
That gets more cumbersome if the table has indexes (you will have to create them on the new table), and even more cumbersome if foreign keys point to it (you will have to drop them before step 3 and recreate them after step 4)

“Copy all data” also can be difficult if the table has data that the database created that must stay the same because you use it elsewhere. That shouldn’t be a problem with SQLite, as it doesn’t allow rowid as foreign key, but if you use it as a foreign key outside the database, or use the hash of a full row to detect changes, it may still bite you.

It also may mean being offline for a significant amount of time, but that also often is (effectively) the case for databases that support deleting columns

Re:Dqlite – High-Availability SQLite by Dowwie on Friday August 30, 2019 @03:57PM (#20842058)
good points
Re:Dqlite – High-Availability SQLite by bfrog on Friday August 30, 2019 @03:41PM (#20841876)
Which adds up to dozens to hundreds of lines of code which needs to be maintained in each project you use sqlite with, vs the one liner of sql that would be required if using a sql that supported it.
Re:Dqlite – High-Availability SQLite by mbreese on Friday August 30, 2019 @05:19PM (#20842826)
It's only required if you need the ability to change the schema of a SQLite table at runtime. I'd wager that's not a very common use-case for SQLite.
Re:Dqlite – High-Availability SQLite by tylerhou on Saturday August 31, 2019 @12:42AM (#20844649)
What about database migrations? My app which uses a SQLite database needs to store an additional column for a table. Now I have to write a bunch of custom code to migrate it.