SIGN IN SIGN UP

(core) Migrate edition from config.json to home DB

Summary:
This updates Grist to read and write the edition (community or full) to GRIST_SERVER_EDITION, a recently-added env variable whose value may be written to the home DB (`envVars`, within `activations.prefs`).

The previous method of persisting the edition (config.json) is no longer used. For backwards compatibility with existing installations, a one-time migration now runs from `initializeAppSettings` to copy its edition value to `GRIST_SERVER_EDITION` in the home DB.

GRIST_FORCE_ENABLE enterprise is still supported and is equivalent to setting GRIST_SERVER_EDITION to full. This has higher precedence than GRIST_SERVER_EDITION (env or db).

Since GRIST_SERVER_EDITION may be derived from a value in the home DB, the global `create` instances have been changed to global getter functions that return a singleton (`getCreate`). This allows the correct `create` instance to be constructed _after_ appSettings has been initialized with the edition saved in the DB.

Test Plan: Server tests

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D5021
G
George Gevoian committed
da352571ab242303512ecb4a2966c132e4f18a2c
Parent: e84a154