Summer 2021 and later
If coming from a very old Imagicle suite installation, even if kept up to date, it may occur that upgrading to the 2021.6.1 release, the operation fails at the database updating phase.
Logs contained in BillyBlues.Core.Wizard folder show the following error:
Exception Type {System.Data.SqlClient.SqlException}
Message {Column 'dbo.Siti.sNome' is not the same data type as referencing column 'Users.user_SiteName' in foreign key 'FK_Users_Siti'.
Could not create constraint or index. See previous errors.}
StackTrace {
in Microsoft.SqlServer.Management.Common.ConnectionManager.ExecuteTSql(ExecuteTSqlAction action, Object execObject, DataSet fillDataSet, Boolean catchException)
in Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType, Boolean retry)}
}
The “sNome” column type of table “Siti” is VARCHAR(50) instead of NVARCHAR(50)
With 2021.Summer.1 has been introduced into DB schema an FK that references the “sNome” Column on “Siti” table that could trigger the issue.
Manually change the type of the column “sNome” to NVARCHAR(50) by executing below query on the database with the SQL Management Studio (to be done on both nodes in case of cluster):
ALTER TABLE Siti ALTER COLUMN sNome NVARCHAR(50) NULL
If an error occurs
Follow this guide
remove the FK_Users_Siti foreign key from Users table
ALTER TABLE [dbo].[Users] DROP CONSTRAINT [FK_Users_Siti]
remove the UQ_Siti_sName index from Siti table
ALTER TABLE [dbo].[Siti] DROP CONSTRAINT [UQ_Siti_sNome]
change the type of the column sNome
ALTER TABLE Siti ALTER COLUMN sNome NVARCHAR(50) NULL
add again the UQ_Siti_sName index to Siti table
ALTER TABLE Siti ADD CONSTRAINT UQ_Siti_sNome UNIQUE (sNome)
change the type of the column user_SiteName
ALTER TABLE [dbo].[Users] ALTER COLUMN user_SiteName NVARCHAR(50) NULL
add again the FK_Users_Siti foreign key to Userstable
ALTER TABLE [dbo].[Users] WITH CHECK ADD CONSTRAINT [FK_Users_Siti] FOREIGN KEY([user_SiteName])REFERENCES [dbo].[Siti] ([sNome])ON UPDATE CASCADE
re-run the IAS installer