Using the following valid syntax, where I want to drop and add back the same Foreign Key, I have found what I consider a bug in the Microsoft key name generation where an extra ']' right bracket character is needed. The SS software requires this extract ']', which can be found at the literal string part of _[PremisesID]']')];, where the errant ']' is denoted in the string for clarity.
Therefore, I consider this a Microsoft bug.
ALTER TABLE [APP].[Accounts] DROP CONSTRAINT [FK1_Premises_PremisesID_(Accounts_[PremisesID]])];
ALTER TABLE [APP].[Accounts] ADD CONSTRAINT [FK1_Premises_PremisesID_(Accounts_[PremisesID]])] FOREIGN KEY(PremisesID) REFERENCES [APP].[Premises](PremisesID);
Additional information supporting my point of view.
• If I query sys.objects the foreign key is properly named so the error is in the code to drop, add or rename the foreign key.
select * from sys.objects where name = 'FK1_Premises_PremisesID_(Accounts_[PremisesID])' and type ='F'