Add db creation to demoservice
Motivation: Demonstrate the creation of MySQL Database with resource configuration. Linked issues:
Checklist
- [ ] Build rule
all-supportedcompleted successfully - [ ] Package upgrade completed successfully
- [ ] New installation of package completed successfully
Remarks
- add demo of creating a mysql db by resource configuration
- add uninstall wizard to optionally drop the database and/or the db user
@hgy59 Would it be possible to also produce a database dump from a wizard checkbox before deletion? probably requesting for a dump destination folder, using an obvious file name like "mysql_schema_timestamp.dump.gz" for instance.
@hgy59 Would it be possible to also produce a database dump from a wizard checkbox before deletion? probably requesting for a dump destination folder, using an obvious file name like "mysql_schema_timestamp.dump.gz" for instance.
As I am currently working on ffsync this would be a logical extension. Another task is to test this with DSM7.
For DSM7 if you need testers let me know. I'm currently moving/testing some packages to this new DSM.
Hm so we have to create different json for DSM6 or DSM7...
You might like this bit, for removing the db only when the user wants to: https://github.com/SynoCommunity/spksrc/blob/eea72307f2c0bdaf0217e5ecba90b94476ae6eb1/spk/wallabag/src/installer.sh#L66-L75
You might like this bit, for removing the db only when the user wants to:
The current code has already implemented this behaviour, but does not need any code like you propose. The variables are already in the uninstall-wizard. And you cannot only drop the db, there is a separate option (and wizard check box) to drop the user.
And AFAICS this is compatible with DSM 7.
Thanks @hgy59. From memory it did not work correctly on DSM7 (hence my workaround) but maybe it will be fixed before DSM7 is released. Woud be possable to have an example that works on both DSM6 and DSM7? Otherwise good job.
The additional changes can be added in a follow-up PR