# If I am using query storage and update my DAML models do I need to re-run json-api with createSchema=true?

**URL:** <https://forum.canton.network/t/if-i-am-using-query-storage-and-update-my-daml-models-do-i-need-to-re-run-json-api-with-createschema-true/1037>\
**Category:** App Development\
**Tags:** json-api\
**Created:** [August 13, 2020, 3:46pm UTC](https://forum.canton.network/t/if-i-am-using-query-storage-and-update-my-daml-models-do-i-need-to-re-run-json-api-with-createschema-true/1037 "2020-08-13T15:46:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anthony](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/anthony/32/419_2.png) [@anthony](https://forum.canton.network/u/anthony)\
**Post date:** [August 13, 2020, 3:46pm UTC](https://forum.canton.network/t/if-i-am-using-query-storage-and-update-my-daml-models-do-i-need-to-re-run-json-api-with-createschema-true/1037/1 "2020-08-13T15:46:20Z")

</div>

If so, under what conditions do I need to do this, and under which do I not?

If so, then I also assume that if I add or remove contracts, or change something about the contract’s constructor I’ll need to do this, but are there any other situations?

---

<div class="post-metadata">

**Author:** ![Stephen](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/stephen/32/102_2.png) [@Stephen](https://forum.canton.network/u/Stephen)\
**Post date:** [August 13, 2020, 4:25pm UTC](https://forum.canton.network/t/if-i-am-using-query-storage-and-update-my-daml-models-do-i-need-to-re-run-json-api-with-createschema-true/1037/2 "2020-08-13T16:25:37Z")

</div>

No, you do not need to recreate the schema for any of the reasons you mentioned.

The only reasons to rerun with `createSchema=true` are

1. you upgraded JSON API itself and the release notes mention a schema change and that you must do this (rare), or
2. you want to clear the cache.

If you have added any custom indices directly to the database regarding your contract structure, you may wish to update those indices. It doesn’t make any difference to JSON API, though.
