-
-
Notifications
You must be signed in to change notification settings - Fork 27
Description
Is your feature request related to a problem? Please describe.
Currently there's no way to restructure the user data if your app is hosted on the Remake hosting service. This is necessary if the structure of your app's data changes.
For example, v1 of your app might only have a single to-do list. But, for v2, you want to have multiple to-do lists. You need a way to loop through all user data and moving their to-do list inside an array of to-do lists.
Describe the solution you'd like
Since Remake probably won't support executing server-side code from users any time soon, an alternate solution would be to let devs modify user data locally and then re-upload it to their live app.
- Backup your app's data with
remake backupand unzip it (currently available command) - Shut down your remote app with
remake shutdown-app(new command) - Update the data in your local app by running a script on all the user data files (e.g. the script could be located in
/app/data/migrate.js - Upload your app data back to your production app with
remake upload-user-data(new command) - Restart your app with
remake start-app(new command)
This could all be condensed into a single command remake migrate:
- Tell you what's going to happen — and confirm that you've double checked your
/app/data/migrate.jsfile - Run all the steps above in order
- Delete any temporary files, but leave the backup zip file so you can recover if you make a mistake
Describe alternatives you've considered
An alternative would be to allow users to execute server code. This is a security risk right now, but if each user was limited to their own virtual server container, it could work.