Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
Hi,
I'm learning how Operator Advisor works and how we can use it in our future projects.
I understand when I add properties in the _AP table before I run the service 'CreateTables', the properties are added in de database table.
But let's say the project is live, already containing data, and I want to upgrade the data model. How do we do this? Do we add a field in the datashape and add a column in the database manual? Or are there services to update all _AP tables? Because 'CreateTables' goes in error if I try a second time.
Jasper
Solved! Go to Solution.
Yes, can add the field to the datashap and manually update the database.
Alternatively, you could leverage the AddColumn service used during upgrades.
Search for AddColumn in the user guide to find an example of this service.
https://www.ptc.com/support/-/media/4FA487F6B4244A70B82F0A42120551CC.pdf?sc_lang=en
Yes, can add the field to the datashap and manually update the database.
Alternatively, you could leverage the AddColumn service used during upgrades.
Search for AddColumn in the user guide to find an example of this service.
https://www.ptc.com/support/-/media/4FA487F6B4244A70B82F0A42120551CC.pdf?sc_lang=en
Thanks for your answer. It does not sound very practically though. This way, when we change our projects from a Dev environment to Test or Production, we can't automatically 'do an upload' of all our datashapes to the database and this way add columns dat have been added in the meantime.
We also can't see in de database if the column already exists, right? So I think we can't program this ourselves if I see it correctly? Please correct me if you see a solution to this problem.
Kind regards,
Jasper
Hi Jasper,
I agree that tihs is not so practical. We have been looking at adding improvements to the process. In the meantime, it is ok to run the AddColumn service on each system(Test, dev, etc..). If the column already exists it will simply fail