3

I'm running a local geth node, and I have a truffle project that was already migrated once, but I'm having issues migrating additional contracts, or even updating past contracts.

I create a new contract in the /contracts folder, compile it and add it to 2_deploy_contracts.js, but when I try running truffle migrate it says that the network is up to date. Any help?

4

The concept behind truffle migrations is that it keeps track of deployed contracts and by default it won't allow you to redeploy once it's deployed.

The rational behind that is you need to make sure you explicitly deal with data migration on live blockchain. Ie. you need to write additional migration steps for each new release in live env.

However during development you have multiple options to force redeployments with truffle migrate command line options:

truffle migrate -f <migration step number x>

will force migration from step x.

truffle migrate --reset

will run migration from scratch, running all migration steps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.