Created on 2022-10-20 03:11 by rouilj, last changed 2022-10-27 13:31 by rouilj.
|msg7652||Author: [hidden] (rouilj)||Date: 2022-10-20 03:11|
Add a sql command to roundup-admin to allow running sql commands against the database. Specific use case is to toggle sqlite db from delete to wal journal mode and back. The admin/upgrading documentation uses sqlite3. If sqlite3 is not installed (e.g in a docker container) Roundup should provide some alternate method. If the sql command is run against a non-sql backend it should return an appropriate error. Open question: should the sql command allow arbitrary sql, or should it be filtered (e.g. to rule out dropping tables)?
|msg7653||Author: [hidden] (ber)||Date: 2022-10-27 13:09|
> If sqlite3 is not installed > (e.g in a docker container) Roundup should provide some alternate method. What about installing sqlite3 in this situation? (I fear that we need to provide too much for a situation that is too rare.)
|msg7654||Author: [hidden] (rouilj)||Date: 2022-10-27 13:31|
Hi Bern: >What about installing sqlite3 in this situation? >(I fear that we need to provide too much for a situation that is too rare.) They could install the sqlite3 command line tools and then remove them from the container. With the current docker container based on alpine the package manager should make this easy. However the container does need network access to the alpine repos. Also if somebody opts to build on a different container base, they might not have easy access to the sqlite3 cli package. Tthe implementation of this in roundup-admin should be as simple as setting up the command framework and calling self.db.sql('string passed from trusted user on command line') along with adding docstrings etc. It does complicate the UI with a new command. Also man pages and other docs need updating. I also agree this is a bit of an edge case.
|2022-10-27 13:31:53||rouilj||set||messages: + msg7654|
messages: + msg7653