Hi all, I'm seeing an issue after removing columns from an environment using Remove-PWEnvironmentColumn. Seems that something is left behind in the database after deleting columns that causes adding the column back to the environment with the same name causes an error, from the administrator client and from the cmdlet for Add-PWEnvironmentColumn.
error,
WARNING: Error modifying table: 56051WARNING: Failed to add column 'TEST3'. Error: 56051
#Step 1, Add Environment ColumnsNEW-PWLoginAdd-PWEnvironmentColumn -EnvironmentName "Example Environment" -ColumnName "TEST3" -ColumnType 'text' -ColumnWidth 32
#Step 2, Delete Environment Columns Remove-PWEnvironmentColumn -ColumnName TEST3 -EnvironmentName "Example Environment" -Verbose
#Step 3, Add Environment ColumnsAdd-PWEnvironmentColumn -EnvironmentName "Example Environment" -ColumnName "TEST3" -ColumnType 'text' -ColumnWidth 32
any help would be appreciated,
thanksCraig
Thanks for the reply, If the AAM is exported, the column is not listed there. But yes, the backend table still holds the column. The question is this, should that be the case? or is this a defect?
Actually there were merits to not removing the actual data. It was the more conservative approach, leaving the database to the DBAs. In today's release we have added a RemoveDatabaseColumn switch. If you use it, the column and its associated data get removed from the database.
Mark Weisman | Bentley Systems
Thank you. The only additional comment would have is based on the fact that if the column remains in the database, the PWAdmin \ person might not know the column was left behind. Could cause issue at a later. Either way, understood and thank you. will review the change.