Patch #31230

Fix: migration fails in MS SQL-Server

Added by Anders Thomsen over 2 years ago. Updated over 1 year ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Database
Target version:-

Description

Fixes #24402

Migration fails when building (db:migrate) the database from scratch on SQL-Server. Run db:migrate again an it runs successfully.

It seems to be a cache problem.

Both 3.4 and 4.0 branches should be patched as 4.0 currently fails on SQL-Server (#30285).

Solution was found here: https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/issues/420

clear_cache-master.patch Magnifier (588 Bytes) Anders Thomsen, 2019-04-20 08:45

clear_cache-3.4-stable.patch Magnifier (583 Bytes) Anders Thomsen, 2019-04-20 08:45


Related issues

Related to Redmine - Defect #30285: Microsoft SQL server support is broken Closed
Related to Redmine - Defect #24402: sqlserver2014: db:migrate failed Closed

History

#1 Updated by Go MAEDA over 2 years ago

Anders Thomsen wrote:

Solution was found here: https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/issues/420

According to the tread, the problem was fixed in activerecord-sqlserver-adapter 4.2.1. Do we have to fix db/migrate/20160416072926_remove_position_defaults.rb? (sorry, I don't have an environment that runs MS SQL Server)

#2 Updated by Anders Thomsen over 2 years ago

Installing Redmine 3.4 pulls activerecord-sqlserver-adapter 4.2.18 (the latest of the 4.2 series). That version does not seem to include the fix so the patch is needed for RM 3.4.

Redmine 4.0 pulls activerecord-sqlserver-adapter 5.2 where it seems to be fixed. Can't test with 4.0 though because of the other bug so lets wait until that gets resolved to see if it is necessary for 4.0 as well.

#3 Updated by Go MAEDA over 1 year ago

  • Related to Defect #30285: Microsoft SQL server support is broken added

#4 Updated by Go MAEDA over 1 year ago

  • Status changed from New to Closed

The issue that Redmine 4.0 and 4.1 don't work with SQL Server will be fixed in the upcoming 4.1.1 and 4.0.8. Since those versions use activecord-sqlserver-adapter 5.2.1, the error never occurs.

Redmine 3.4 will not be fixed because 3.4 series is no longer maintained.

#5 Updated by Go MAEDA over 1 year ago

  • Related to Defect #24402: sqlserver2014: db:migrate failed added

Also available in: Atom PDF