Open panphora opened 3 years ago
Hey @charlietango, I don't know if this sounds interesting to you, but Remake could really use it. Currently, there's no way to undo a mistake in the structure of your data. A few users have requested migration support, as it's necessary for any serious use of Remake.
What do you think about the proposed solution?
This is a much-needed feature, please!!
Even if there isn't a perfect solution, there has to be some way at least to change the structure. The only thing Remake doesn't have to make it the best I guess 😳
Hey @charlietango, I don't know if this sounds interesting to you, but Remake could really use it. Currently, there's no way to undo a mistake in the structure of your data. A few users have requested migration support, as it's necessary for any serious use of Remake.
What do you think about the proposed solution?
Hey @panphora let's talk this weekend about it. I will take some time to think about the feature and about the solution you suggested.
@charlietango We only really need one new command to support this: remake upload-user-data
.
The shutdown-app
and start-app
commands aren't really necessary.
And, while we should add a feature that tells users their app is out of date and that they need to refresh to get the newest version, we can save this for a future feature build.
I think when the dev runs remake upload-user-data
it should:
./app/data/database
directory relative to the current directory and show an error if it's not there./app/data/database
directory from the app they're currently in (and name that app) and then show a bright red "WARNING: this will overwrite ALL the user data currently on the server"./app/data/database
directory and replace their app's current databaseI think that's all we need for now
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.
remake backup
and unzip it (currently available command)remake shutdown-app
(new command)/app/data/migrate.js
remake upload-user-data
(new command)remake start-app
(new command)This could all be condensed into a single command
remake migrate
:/app/data/migrate.js
fileDescribe 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.