Whenever you change a key or autonumber field, it will always give this error because the database constraints are already done and OutSystems does not change them back.
What you must do is go to MS-SQL directly and, if possible, delete the table.
But, if there's data that you want to keep, the alternative is to delete the constraint in MS-SQL*.
After that you can publish the Outsystems project. It will create the table structure again, with the correct constraints.
*But this is not good and doesn't work always - depending on what changes you made. Better approach is to rename the table, let Outsystems create the new one and then import the existing data to the fresh and new table.