Mike Horton wrote
First question for you Neil.... What version of DNN are we talking about here so I know where to look?
DNN 4.8.2
Also to make sure I'm looking at the correct table you're talking about the Roles table and not the UserRoles table correct?
Yes. dbo.Roles. Although on looking further I see dbo.UserRoles has also been changed. They both have RoleId nvarchar(50) columns.
What modules have you installed lately?
I keep the zips in one place so it is easiest to give you the directory listing:
05-30-08 10:56AM 349264 10411_DNNMenu_QuickInstallationGuide.zip
05-30-08 10:56AM 99612 10554_0_Google+Analytics+Documentation_entrepriseVersion.zip
05-30-08 10:56AM 149585 10554_0_PHD-GoogleAnalytics-Complete-V1_EntepriseVersion.zip
05-30-08 10:56AM 49850 10554_0_PhdGoogleStats-V1-PA_EntrepriseVersion.zip
05-30-08 10:56AM 172449 4330_OverandOutImagesSRC3.2.zip
05-30-08 10:56AM 51542 5128_0_DataSprings_FlashImageRotator_Module_3.2.zip
05-30-08 10:56AM 13922 8824_0_SVS.GoogleAnalytics_PA_v4.6.2.zip
05-30-08 10:57AM 45466 9186_0_AjaxModuleWrapper_1_5_0_PA.zip
05-30-08 10:57AM 2020 9186_0_AjaxModuleWrapperLicense.zip
05-30-08 10:57AM 123146 OOImages.zip
05-30-08 10:57AM 20099 OverandOutImages-DNN4.x.PA.zip
05-30-08 10:57AM 1509 TheDNN.Menu.License.zip
05-06-08 03:45PM 1823071 XMod51_DNN45.zip
A DNN Project module (one that's available from the DNN site) would never have passed the Release process if it arbitrarily changed the type for a core table.
Pleased to hear that:-) I would have felt very nervous otherwise.
I do believe All Users (which isn't really a role) does return a -1 when but as far as the other default Roles on a single portal install (Registered Users and Subscribers) they should be RoleID 1 and 2 respectively and Administrators RoleID=0.
But surely -1 doesn't go into a RoleId FK column? That would mean referential integrity isn't possible to enforce for RoleId FKs leaving them open to insert, delete and update errors.
In fact on looking at a newly installed database with no modules added, I see that Roles is referencing UserRoles correctly, but no relationship is established beteen Roles and the 3 ...Permission tables. These ...Permission tables all contain various negative RoleIds (-1, and -2) so that is why the relationships will have been broken.
I guess my last question, and I can see why you may not have tried this yet in case it made things worse, is have you tried setting the RoleID back to an int in your database?
Doing it on when I get some time. Maybe I will see what breaks then as well. I will report back.
Neil