Our version detection code is relatively simple, so we shouldn't have any exceptions arising there
Just check for a None return value to decide whether we should use the older logic
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
Use `zgrep` to check for table name match where required
Also use a table that's at the top of the dump files (`__Auth`)
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
The database resource management including privileges granting can be
done by external secops. It can be undesirable to grant the grant option
to the framework user.
This commit implements the possibility to remove user resource
management from frappe entirely and only boostrap the database with its
target user.
This has been done because the mysql command issues a deprecation warning now
mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb' instead
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
When you reinstall app forcefully all dependencies will also get
forcefully reinstalled. This IMO isn't required in most cases and can
even be breaking.
Anyway if required those apps can be manually force installed.
This avoids having to manipulate config files in brittle bash
entrypoints that need to react to dynamic service discovery.
This significantly improves the operability of various bench sites.
This isn't working because it uses update_site_config command which
attemts to find site_dir to create a lock which doesn't work when site
isn't init-ed.
refactor: clean up code to py39+ supported syntax
- f-strings instead of format
- latest typing support instead of pre 3.9 TitleCase
- remove UTF-8 declarations.
- many more changes
Powered by https://github.com/asottile/pyupgrade/ + manual cleanups
* fix(bench): new-site params for root db credentials
allow root credentials for postgresql
use common cli option name for both database types
* fix(bench): backward compatible db params
Co-authored-by: gavin <gavin18d@gmail.com>
* fix(bench): use common db cred params
use --db-root-username and --db-root-password
* feat(bench): add --set-default to bench new-site
* fix: do not set default root user
* fix: indentation
Co-authored-by: gavin <gavin18d@gmail.com>