Project

General

Profile

Actions

Bug #7381

closed

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

Added by Pavel Kácha almost 3 years ago. Updated over 2 years ago.

Status:
Closed
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 Hruška almost 3 years 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 Hruška almost 3 years 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 Hruška almost 3 years 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 Hruška over 2 years ago

  • Status changed from Resolved to In Review

Merged into devel.

Actions #5

Updated by Pavel Kácha over 2 years ago

  • Status changed from In Review to Closed
Actions

Also available in: Atom PDF