cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

How to reset SiteUID

SOLVED
Highlighted
Aquamarine

How to reset SiteUID

I used the createSite Service in Thing: PTC.SCA.SCO.DefaultShiftManager to make shifts.

I made several sites as a test. And I used the delteSite Service to erase sites.
but The site deleted without initialization of 'siteUID'
For example I made four sites.and then I delete 1,2,3,4 siteUID.
After I made new site but I got '5' siteUID I want to get '1' siteUID

I want to know how to reset siteUID. Thank you.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: How to reset SiteUID

@JackEom : I tested this scenario. When you delete a site id lets say site id '2' and when you create a new site id it will generate from '3'. The only way is to modify it at the db level.

View solution in original post

4 REPLIES 4
Highlighted

Re: How to reset SiteUID

@JackEom If you have not created shifts and shiftschedule for a site, you can update the site table directly in database for updating its uid. 

However if for a site you have created shifts and shift schedules , then you would get foreign key violation constraint while trying to update in the db.

P.S - Please be careful while manipulating data directly in database.

Highlighted

Re: How to reset SiteUID

Thanks for answering.

I have already created shiftschedule and shift. The problem I've said also occurs in shiftschedule and shift.

If I delete uid, is it impossible for deleted uid to be generated?(e.x if I deleted '2' Site UID or ShiftSchedule UID or Shift UID, is it impossible those to be generated?) Is there only a way to modify uid?

Highlighted

Re: How to reset SiteUID

@JackEom : I tested this scenario. When you delete a site id lets say site id '2' and when you create a new site id it will generate from '3'. The only way is to modify it at the db level.

View solution in original post

Highlighted

Re: How to reset SiteUID

Thank you for the details.
I'll test it using db.

Announcements