bugnet icon indicating copy to clipboard operation
bugnet copied to clipboard

SQL Azure and PK dropping in 1.6.327.0

Open gui-jasmin opened this issue 10 years ago • 2 comments

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.

gui-jasmin avatar Feb 12 '15 21:02 gui-jasmin

What was the table name?

dubeaud avatar Feb 13 '15 13:02 dubeaud

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

gui-jasmin avatar Feb 14 '15 02:02 gui-jasmin