v3.0.0
💥 Breaking Changes
- This release unwinds the multi environment config concept. See #30 for the corresponding issue.
- To take this update, developers need to also migrate to v5.X.X of hoist-react or v2.X.X of hoist-sencha and follow these steps in each environment:
Step 1
If you are doing this migration in a lower environment (dev, stage, uat) you may want to keep that environment's configs. For example, if you are migrating the dev env app to this new code, and there are configs in the dev_value column that you would like to keep in the dev environment, you first need to manually copy these values from the dev field to the prod field in the dev admin config UI.
Step 2
Turn off your grails server and your webpack server (if applicable).
Add a new 'value' column with allow null, allow null in the old 'prod_value' column, then copy prod_value values over to the new value column:
For MySQL DB:
ALTER TABLE `xh_config` ADD `value` LONGTEXT;
ALTER TABLE `xh_config` MODIFY `prod_value` LONGTEXT;
For MS SQL Server DB:
ALTER TABLE xh_config
ADD value varchar(max) NULL
ALTER COLUMN prod_value varchar(max)
For MySQL DB:
UPDATE `xh_config` SET `value` = `prod_value`
For MS SQL Server DB:
UPDATE xh_config SET value = prod_value
Step 3
Update app code in environment to use hoist-core v3.0.0 and hoist-react v5.X.X or hoist-sencha v2.0.0.
If your app is in a customer/client's environment, you will not be updating hoist-core, but rather [customer]HoistVersion to version 5.0.0.
Remove
supportedEnvironments = ['Staging', 'Development']
from grails-app/conf/application.groovy in your app. (Note that this line might appear twice - once near the top if an app has customized and once in the "hoistDefaults" section.)
Step 4
Set value to not accept NULL and drop old columns:
For MySQL DB:
ALTER TABLE `xh_config`
MODIFY `value` LONGTEXT NOT NULL;
ALTER TABLE `xh_config`
DROP COLUMN `beta_value`, `stage_value`, `dev_value`, `prod_value`;
For MS SQL Server DB:
ALTER TABLE xh_config
ALTER COLUMN value varchar(max) NOT NULL
ALTER TABLE xh_config
DROP COLUMN prod_value, dev_value, stage_value, beta_value
🎁 New Features
- None
🐞 Bugfixes
- None