# ES migration from 6.8 to 7.17. Data type change in template for "date" type

**URL:** <https://discuss.elastic.co/t/es-migration-from-6-8-to-7-17-data-type-change-in-template-for-date-type/337022>\
**Category:** Elasticsearch\
**Created:** [June 27, 2023, 11:19pm UTC](https://discuss.elastic.co/t/es-migration-from-6-8-to-7-17-data-type-change-in-template-for-date-type/337022 "2023-06-27T23:19:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abhilashsr2008](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abhilashsr2008/32/144143_2.png) [@Abhilashsr2008](https://discuss.elastic.co/u/Abhilashsr2008)\
**Post date:** [June 27, 2023, 11:19pm UTC](https://discuss.elastic.co/t/es-migration-from-6-8-to-7-17-data-type-change-in-template-for-date-type/337022/1 "2023-06-27T23:19:59Z")

</div>

Hi Team  
We are planning to move from ES 6.8 to 7.17 server migration . But in 7.17 -ve values are not supported for date field. So am thinking to change the index template for that specific field from date to long type . Does this in any way affect the query performance or will it create any issue after the rolling upgrade when we access the older index data which is in date type .  
Field in 6.8 template as below

```auto
       "dateInEpoch": {
          "type": "date",
          "format": "epoch_millis",
          "null_value": 0,
          "doc_values": true
        },

```

Proposed change for Field in 7.17 template as below

```auto
        "dateInEpoch": {
          "type": "long",
          "null_value": 0,
          "doc_values": true
        },

```

Thanks in Advance

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 25, 2023, 11:20pm UTC](https://discuss.elastic.co/t/es-migration-from-6-8-to-7-17-data-type-change-in-template-for-date-type/337022/2 "2023-07-25T23:20:33Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
