Project

General

Profile

Actions

Patch #31230

closed

Fix: migration fails in MS SQL-Server

Added by Anders Thomsen over 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Database
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

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


Files

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

Related issues

Related to Redmine - Defect #30285: Microsoft SQL server support is brokenClosedGo MAEDA

Actions
Related to Redmine - Defect #24402: sqlserver2014: db:migrate failedClosed

Actions
Actions #1

Updated by Go MAEDA over 5 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)

Actions #2

Updated by Anders Thomsen over 5 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.

Actions #3

Updated by Go MAEDA over 4 years ago

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

Updated by Go MAEDA over 4 years 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.

Actions #5

Updated by Go MAEDA over 4 years ago

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

Also available in: Atom PDF