# Migration API Error - Slice renaming - solved

**URL:** <https://community.prismic.io/t/migration-api-error-slice-renaming-solved/19642>\
**Category:** Developing with Prismic\
**Tags:** nextjs, slice-machine\
**Created:** [April 27, 2025, 1:15am UTC](https://community.prismic.io/t/migration-api-error-slice-renaming-solved/19642 "2025-04-27T01:15:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rob1](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/rob1/32/9074_2.png) [@rob1](https://community.prismic.io/u/rob1)\
**Post date:** [April 27, 2025, 1:15am UTC](https://community.prismic.io/t/migration-api-error-slice-renaming-solved/19642/1 "2025-04-27T01:15:30Z")

</div>

Hi Just a note that if you get an error whilst migrating a page that has a slce type that isn't compatible with the latets slice machine ie: from legacy slices: '6\_column\_table' to slice Machines Pascal 'SixColumnTable / 'six\_column\_table'' you need to change the slice\_id's prefix as well as the slice\_type when mapping across - I used this -

```auto
`if (slice.slice_type === '6_column_table') {
        base.slice_type = 'six_column_table'
        const uuidPart = slice.id?.split('$')[1] || prismic.generateUID();
        base.id = `six_column_table$${uuidPart}`;
    }

```

@PrismicTeam If we could add this into the error logging as well sometime thanks R

---

<div class="post-metadata">

**Author:** ![Pau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/pau/32/5422_2.png) [@Pau](https://community.prismic.io/u/Pau)\
**Post date:** [April 28, 2025, 6:54pm UTC](https://community.prismic.io/t/migration-api-error-slice-renaming-solved/19642/2 "2025-04-28T18:54:21Z")

</div>

good catch @rob1 !! 🙌

Appreciate you sharing it!
