Project

General

Profile

Actions

Feature #1604

closed

Script for database upgrades

Added by Alexander Watzinger almost 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Category:
Backend
Target version:
Start date:
2021-11-14
Estimated time:

Description

Since we track current and needed database version we will write a script that checks and does database upgrades needed by the software.
In the first version it will have to be started manually because I'm not sure how far we want to automate this. Better test it a while first.

Implementation
A script (install/update_database.py) that contains a dict {database version: upgrade_file_path} and a function that:
  • Checks if current database version is the right one
  • Checks if the software version is supported for database upgrades (not sure how far we want to go back)
  • Makes a backup (like the SQL one you can do manually)
  • For each database upgrade check if the file exists and try executing the SQL
Actions

Also available in: Atom PDF