-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Data migration script to copy data to updated contracts #13
Comments
I think the embark-framework has some kind of "migrations". I am not sure what it exactly does but the name suggest that it might be worth looking into it. |
Wouldn't it be easier to just implement the splitting out of the data to super simple contracts, that we don't have to change anymore? Our actual data now mostly lives in IPFS anyway, so for our current problem of losing e.g. contributors, I think that specific contract could be simple enough, so we don't have to migrate data after publishing it. But maybe I'm missing sth. |
yeah that would be the overall goal. |
Yes, probably. I'm just trying to figure out if it makes sense to spend the time on that script instead of on splitting out the data, so it's better from the start, with the same effort, and we don't have planned manual migrations by design. |
I had experimented with this seed script that basically consumes a JSON and calls methods on the contract. |
As contracts are immutable but we want to iterate developing our contracts we need a method to migrate data from the "old" contract to a newly deployed contract. This will be useful in the current experimental stage.
A simple and quick solution could be a script like the
seed.js
script that reads data from the old contract and populates the new contract.In the future we need to get rid of such a centralized, off-chain script but for now this would be a quick solution.
The text was updated successfully, but these errors were encountered: