Welcome Guest! To enable all features please Login or Register.
Options
View
Go to last post Go to first unread
Offline belsebubii  
#1 Posted : Friday, June 9, 2017 1:49:39 PM(UTC)
belsebubii


Rank: YAF Forumling

Reputation:

Joined: 6/9/2017(UTC)
Posts: 2
Croatia

Hello,

I have been having issues with updating my yaf forum from. I have my database backup and I managed to setup yaf on my local machine. When trying to finish the installation I get an error. The versions I'm using:

Current Version: YAF.NET v1.9.301 (33)
Upgrade Version: YAF.NET v2.2.0 (57)

I go normally through wizard but after I click upgrade I get following error:

FILE:
mssql/upgrade/constraints.sql

ERROR:
There are no primary or candidate keys in the referenced table 'dbo.yaf_MessageReported' that match the referencing column list in the foreign key 'FK_yaf_MessageReportedAudit_yaf_MessageReported'.
Could not create constraint or index. See previous errors.

STATEMENT:
if not exists (select top 1 1 from sys.objects where name='FK_yaf_MessageReportedAudit_yaf_MessageReported' and parent_object_id=object_id('[dbo].[yaf_MessageReportedAudit]'Wink and type in (N'F'Wink)
alter table [dbo].[yaf_MessageReportedAudit] add constraint [FK_yaf_MessageReportedAudit_yaf_MessageReported] foreign key(MessageID) references [dbo].[yaf_MessageReported] (MessageID)

I am not sure how to go about this and any advice would be greatly appreciated.

Thanks!
Sponsor
Offline belsebubii  
#2 Posted : Wednesday, June 14, 2017 3:57:18 AM(UTC)
belsebubii


Rank: YAF Forumling

Reputation:

Joined: 6/9/2017(UTC)
Posts: 2
Croatia

In case someone else has this error I have found the solution:
The issue is that yaf_MessageReported and yaf_MessageReportedAudit tables did not have a primary key defined. I have defined those keys in the DB and now the update works.
Rss Feed  Atom Feed
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Notification

Icon
Error