Defect #1652

migrations 91 and 92 fail against SQL Server 2005

Added by Jason Morris over 13 years ago. Updated over 13 years ago.

Status:ClosedStart date:2008-07-15
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Database
Target version:-
Resolution:Invalid Affected version:

Description

I just attempt to install redmine db onto sql server 2005 and received the following error when running rake db:migrate

91 ChangeChangesetsRevisionToString: migrating ===========================
-- change_column(:changesets, :revision, :string, {:null=>false})
rake aborted!
DBI::DatabaseError: Execute
OLE error code:80040E14 in Microsoft OLE DB Provider for SQL Server
The index 'changesets_repos_rev' is dependent on column 'revision'.
HRESULT error code:0x80020009
Exception occurred.: ALTER TABLE changesets ALTER COLUMN revision varchar(255)

My workaround was to do the two migration manually, which worked fine. I then re-ran the migration and they worked...this also got my db version up to 92.

MigrationPatchr1709.patch Magnifier (1.53 KB) Chris Taylor, 2008-07-29 21:49

History

#1 Updated by Jean-Philippe Lang over 13 years ago

  • Category set to Database
  • Status changed from New to Closed
  • Resolution set to Invalid

Please note that SQLServer database is not supported.

#2 Updated by Chris Taylor over 13 years ago

Migration 91 fails because an index was previously applied to the column, preventing Sql Server from altering it. Migration 92 fails because of a constraint applied to the column. The attached patch resolves both issues.

Also available in: Atom PDF