YAFLogo

shub-niggurath
9 years ago
I get this error, no matter what I check on the installation wizard "Upgrade Database" page:

File: [databasename]/indexes.sql

Error: Invalid object name 'sys.indexes'.

STATEMENT:

IF NOT EXISTS (SELECT 1 FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[yaf_Message]') AND name = N'IX_yaf_Message_Posted_Desc')

CREATE NONCLUSTERED INDEX [IX_yaf_Message_Posted_Desc] ON [dbo].[yaf_Message]

(

[Posted] DESC

) ON [PRIMARY]

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

I'm really stuck here. Thanks for your help.

EDIT: IIS7. SQL Server 2008.

Sponsor

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 3.0.3
9 years ago
open the ../install/mssql/indexes.sql in a text editor (notepad) and replace alll..

SELECT 1 FROM sys.indexes

with

SELECT 1 FROM dbo.sys.indexes

save the file and run the upgrade again.

shub-niggurath
9 years ago
Thank you tha_watcha for the response. That did get me a bit further. I guess I should've just paid attention to the SQL Statement.

I've since replaced all, and then replaced sys.indexes to sysindexes (as sys.indexes does not exist).

The script thought there should be an object_id in the sysindexes table. There wasn't. I replaced it with id, crossing my fingers.

Now, this is what I get:

INSERT statement conflicted with COLUMN FOREIGN KEY constraint 'FK_yaf_BBCode_Board'. The conflict occurred in database 'yaf', table 'yaf_Board', column 'BoardID'.

The statement has been terminated.

I guess I could either loosen the restrictions on the foreign key. Is this what I should do? Or is there another suggestion? Thanks.

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 3.0.3
9 years ago
Originally Posted by: shub-niggurath 

Thank you tha_watcha for the response. That did get me a bit further. I guess I should've just paid attention to the SQL Statement.

I've since replaced all, and then replaced sys.indexes to sysindexes (as sys.indexes does not exist).

The script thought there should be an object_id in the sysindexes table. There wasn't. I replaced it with id, crossing my fingers.

Now, this is what I get:

INSERT statement conflicted with COLUMN FOREIGN KEY constraint 'FK_yaf_BBCode_Board'. The conflict occurred in database 'yaf', table 'yaf_Board', column 'BoardID'.

The statement has been terminated.

I guess I could either loosen the restrictions on the foreign key. Is this what I should do? Or is there another suggestion? Thanks.

Do not check the checkbox "Upgrade BBCode Extensions...". then the installation should work.

shub-niggurath
9 years ago
Viele Danke!

That worked. Thank you, thank you, thank you!!!!!!!!!!!!!!!!!