But the table dbo.mcl_Workflows is still there. I did no mangling in the db (except for your scripts could be those to "lock" things up?).
EDIT: I have to correct myself! The table mcl_Workflow is there but mcl_Workflows (with "s" at the end) doesn't seem to exist... how is it possible?!
I checked another DNN clean install and there is no Workflows table only Workflow... may this be a DNN bug?
I created a fake mcl_Workflows table copied from the Workflow one. This seemed to work but:
Errore: Site Management non è attualmente disponibile. DotNetNuke.Services.Exceptions.ModuleLoadException: The DELETE statement conflicted with the REFERENCE constraint "FK_mcl_FolderPermission_mcl_Roles". The conflict occurred in database "sitilocalimcl", table "dbo.mcl_FolderPermission", column 'RoleID'. The statement has been terminated. ---> System.Data.SqlClient.SqlException: The DELETE statement conflicted with the REFERENCE constraint "FK_mcl_FolderPermission_mcl_Roles". The conflict occurred in database "sitilocalimcl", table "dbo.mcl_FolderPermission", column 'RoleID'. The statement has been terminated. in System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) in System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) in System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) in System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) in System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds) in System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite) in System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite) in System.Data.SqlClient.SqlCommand.ExecuteNonQuery() in PetaPoco.Database.Execute(String sql, Object[] args) in DotNetNuke.Data.PetaPoco.PetaPocoHelper.ExecuteNonQuery(String connectionString, CommandType type, String sql, Object[] args) in DotNetNuke.Data.DataProvider.DeletePortalInfo(Int32 PortalId) in DotNetNuke.Entities.Portals.PortalController.DeletePortalInfo(Int32 portalId) in DotNetNuke.Entities.Portals.PortalController.DeletePortal(PortalInfo portal, String serverPath) in DotNetNuke.Modules.Admin.Portals.Portals.OnGridDeleteCommand(Object source, GridCommandEventArgs e) --- Fine della traccia dello stack dell'eccezione interna ---
It seems something wiked is going on here. The delete on a full portal should take care of FK/PK relationship I guess.