Bug #7381
closedUpgrading section contains problematic mentat-dbmngr.py --command init
100%
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.
Updated by Rajmund Hruška over 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.
Updated by Rajmund Hruška over 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.
Updated by Rajmund Hruška over 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.
Updated by Rajmund Hruška over 3 years ago
- Status changed from Resolved to In Review
Merged into devel.