Migration Wizard - GogoVega/node-red-contrib-firebase-realtime-database GitHub Wiki
The v0.6.0 has two Wizards: one to migrate the current configuration and the other one to ensure that the new config-node has been loaded.
Why a Migration?
Version 0.6 introduces a new config-node to replace the old one.
[!NOTE] Learn more about the reasons for this change here.
If you update to v0.6, the editor will show you the following notification:
And your config-nodes previously database-config
are now of type unknown
.
To resolve this config-node change without losing your existing configuration, please run the Migrate script. (see below)
[!IMPORTANT] Wizard (from the editor) resolves breaking changes and non-breaking changes.
Wizard (from command line) may be forced to resolve only breaking changes.
Non-breaking changes do not necessarily have to be resolved but the editor will mark these nodes as error.
How to Migrate?
A wizard has been added to help you to migrate your flows in one-go. There are two ways to do it:
From the editor
After updating to v0.6 and restarting Node-RED, the following notification will appear in your editor, click Run Migrate
and confirm.
A new notification will appear and offer you two options:
- View Changes: Shows a window with the changes
- Undo: Cancel the Migration (as Ctrl + Z)
[!TIP] Below a video of the update to v0.6:
https://github.com/user-attachments/assets/681c6476-0b46-43b8-830f-11977a6e8cf5
[!NOTE] The
merge
option in the changes window has been deliberately disabled so as not to undo the changes.
[!TIP] You can manually trigger the Migration script by searching for
Run Firebase Migration
in the actions list[1].
From a command line
You can also trigger the Migration from a command line.
Go to your node-red
folder and run the following command:
cd ~/.node-red/node_modules/@gogovega/node-red-contrib-firebase-realtime-database
npm run migrate
# run 'npm run migrate -- --help' to show help
[!IMPORTANT] Hosted services such as FlowFuse do not have a file system and therefore it is not possible to start the migration because the
flows.json
does not exist!
Manually
Go to your flows.json
file in your node-red
folder and replace each line
"type": "database-config"
by
"type": "firebase-config"
[!IMPORTANT] Replacing the config-node type only resolves the Breaking Changes
What does Migration do?
For breaking changes, the script will change the type of config-node and for non-breaking changes, the script will migrate data that has changed names.
[!NOTE] You will be able to find the migration code here.
New Config-Node Missing
The current Node-RED core means you will need to restart Node-RED if you install this version.
Updating to v0.6
After updating to v0.6 from Manage Palette, you must restart Node-RED and reload your browser to reload the nodes.
[!TIP] You will normally not have any installation problems after restarting Node-RED
Installing v0.6
If you are installed v0.6 (first time) from Manage Palette, you must also restart Node-RED. Indeed Node-RED will load the Firebase nodes but will not load the config-node and will show you the following notification:
[!NOTE] No Panic! The Migration Wizard will show you a notification with instructions to follow.
Issue?
If you have a bug, please raise an issue with log details.
[1]: Right click on the workspace and click on Show Actions List