bugnet
bugnet copied to clipboard
SQL Azure and PK dropping in 1.6.327.0
I have an instance running on SQL Azure and I tried upgrading 1.6.315 to 1.6.339 today. In the 1.6.327 script, there is a PK Drop and recreate to add RelationType to the PK.
On the SQL Azure, it gave me "Tables without a clustered index are not supported in this version of SQL Server. Please create a clustered index and try again." error.
I had to manually create a new table with the same schema, move the data over, delete the old table and rename the newly created table to the old.
What was the table name?
ALTER TABLE [dbo].[BugNet_RelatedIssues] DROP CONSTRAINT PK_BugNet_RelatedIssues GO
ALTER TABLE [dbo].[BugNet_RelatedIssues] ADD CONSTRAINT PK_BugNet_RelatedIssues PRIMARY KEY CLUSTERED ([PrimaryIssueId] ASC, [SecondaryIssueId] ASC, [RelationType] ASC) GO