How to migrate old databases ie previous to redmine 420 » History » Version 2
Pedro Gutierrez, 2022-10-06 14:38
1 | 1 | Pedro Gutierrez | h1. How to migrate old databases ie previous to redmine 4.2.0 |
---|---|---|---|
2 | |||
3 | Feature #1237 in redmine version 4.2.0 provided support for two factor authentication. |
||
4 | 2 | Pedro Gutierrez | WRT the database this means that there is a new row in the "settings" table. Without it, you will see the following error after a normal migration from a database older than 4.2.0: |
5 | 1 | Pedro Gutierrez | <pre> |
6 | 2 | Pedro Gutierrez | redmine | I, [2022-08-22T12:17:53.213673 #1] INFO -- : Started GET "/" for 999.999.99.999 at 2022-08-22 12:17:53 +0000 |
7 | redmine | I, [2022-08-22T12:17:53.214458 #1] INFO -- : Processing by WelcomeController#index as HTML |
||
8 | redmine | I, [2022-08-22T12:17:53.216785 #1] INFO -- : Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.7ms | Allocations: 1346) |
||
9 | redmine | F, [2022-08-22T12:17:53.217337 #1] FATAL -- : |
||
10 | redmine | ActiveRecord::StatementInvalid (Mysql2::Error: Table 'redmine.settings' doesn't exist): |
||
11 | </pre> |
||
12 | 1 | Pedro Gutierrez | |
13 | 2 | Pedro Gutierrez | The following is an example to insert that row in MariaDB: |
14 | <pre> |
||
15 | LOCK TABLES `settings` WRITE; |
||
16 | /*!40000 ALTER TABLE `settings` DISABLE KEYS */; |
||
17 | INSERT INTO `settings` VALUES (69,'twofa','0','2022-10-05 12:59:05'); |
||
18 | /*!40000 ALTER TABLE `settings` ENABLE KEYS */; |
||
19 | UNLOCK TABLES; |
||
20 | 1 | Pedro Gutierrez | </pre> |
21 | 2 | Pedro Gutierrez | |
22 | Firts value (69) and last one (current date) might change in your case. |