質問

We've been using yaf since 2001 or 2002.

The version of our forums is 1.7 with more than 2.5 million users registered, which makes for a lot of data...

I've made a copy of the actual DB and I'm trying to upgrade this installation to version 2.1.1, but I get a SQL error on the mssql/tables.sql file when trying to upgrade:

FILE: mssql/tables.sql

ERROR: The index '_dta_index_yaf_Message_9_757577737__K2_K1_K12_K6_4_5_7_8_10_11' is dependent on column 'IP'. ALTER TABLE ALTER COLUMN IP failed because one or more objects access this column.

STATEMENT: if exists (select top 1 1 from sys.columns where object_id=object_id('[dbo].[yaf_Message]'Wink and name='IP' and precision < 39) begin alter table [dbo].[yaf_Message] alter column [IP] varchar(39) not null end

YAF.Classes.Data.LegacyDb.system_initialize_executescripts(String script, String scriptFile, Boolean useTransactions) +1540 YAF.Core.Services.InstallUpgradeService.ExecuteScript(String scriptFile, Boolean useTransactions) +188 YAF.Core.Services.InstallUpgradeService.UpgradeDatabase(Boolean fullText, Boolean upgradeExtensions) +205 YAF.Install._default.Wizard_NextButtonClick(Object sender, WizardNavigationEventArgs e) +1559 System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) +584 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +84 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3804

Do I have to modify some table fields?

The other solution I have is to import manually every single user, forum, etc., but it would take quite some time, so I'm really looking to let the install upgrade the DB automatically.

役に立ちましたか?

解決

You could in theory do the following;

  1. Backup DB (again)
  2. Script the index to a new window.
  3. Drop the index.
  4. Apply the update.
  5. Check the data does not have nulls and fix if required.
  6. Recreate the index.
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top