Project

General

Profile

Actions

Bug #7381

open

Upgrading section contains problematic mentat-dbmngr.py --command init

Added by Pavel Kácha 2 months ago. Updated 20 days ago.

Status:
In Review
Priority:
Normal
Category:
Development - Tools
Target version:
Start date:
05/28/2021
Due date:
% Done:

100%

Estimated time:
To be discussed:
No

Description

"Upgrading Mentat system" section in Upgrading page contains in step 4 initialization of db. This should in most cases be actually a no-op, just checking/fixing existing databases, tables and indexes. However, if migration makes some changes, running this step before migration causes problems, because db init already tries to fix db to new state, but without knowledge of any data migration. The solution might be to put this step after migration, or get rid of it altogether.

Actions #1

Updated by Rajmund Hruska 2 months ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

I checked the init command of mentat-dbmngr.py module. This command indeed just creates tables and indices. I think it's safe to remove this step from the guide, as new tables/indices would be created by the alembic migrations.

Actions #2

Updated by Rajmund Hruska about 2 months ago

  • Status changed from Resolved to In Progress
  • % Done changed from 100 to 0

Based on the meeting from 2021-06-11, same tables or indexes might be created in the code and not as a alembic migration. So, if I want to remove the command from upgrading section I should check a couple of previous major versions to see if removing that command won't cause any issues.

Actions #3

Updated by Rajmund Hruska about 1 month ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

I checked the previous versions of Mentat and looked into migrations, created tables and indexes. There is a migration for every change in the database schema since Mentat version 2.3. I am not really sure about upgrading from 2.2 to 2.3 but I am certain that there are some indexes that need to be created by dbmngr.py command init when upgrading from 2.0 and 2.1.

So, the latest 5 versions don't require init command and I think it is safe to remove this step from upgrading section of documentation.

Actions #4

Updated by Rajmund Hruska 20 days ago

  • Status changed from Resolved to In Review

Merged into devel.

Actions

Also available in: Atom PDF