Umbraco 13 to 17 upgrade - premigration error

In case anyone else comes across this issue, @justin-nevitech was on the money with creating an index manually :raising_hands:

Using this full index definition has worked for me (usual caveats about backing up and testing any database changes thoroughly):

CREATE UNIQUE NONCLUSTERED INDEX [IX_umbracoNode_UniqueId] ON [dbo].[umbracoNode]
(
	[uniqueId] ASC
)
INCLUDE([parentId],[level],[path],[sortOrder],[trashed],[nodeUser],[text],[createDate]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
GO

Sounds as if the index was introduced in v8 for new installs, but no migration was ever added, so if a database has been upgraded since v7 this could be why its missing.