spksrc icon indicating copy to clipboard operation
spksrc copied to clipboard

Add db creation to demoservice

Open hgy59 opened this issue 4 years ago • 7 comments

Motivation: Demonstrate the creation of MySQL Database with resource configuration. Linked issues:

Checklist

  • [ ] Build rule all-supported completed 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 avatar Mar 14 '21 20:03 hgy59

@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.

ymartin59 avatar Mar 14 '21 21:03 ymartin59

@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.

hgy59 avatar Mar 14 '21 21:03 hgy59

For DSM7 if you need testers let me know. I'm currently moving/testing some packages to this new DSM.

DigitalBox98 avatar Mar 17 '21 18:03 DigitalBox98

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

publicarray avatar Mar 18 '21 21:03 publicarray

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.

hgy59 avatar Mar 18 '21 22:03 hgy59

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.

publicarray avatar Mar 22 '21 14:03 publicarray

The additional changes can be added in a follow-up PR

publicarray avatar Apr 04 '21 01:04 publicarray