Bug #7381
closed
Upgrading section contains problematic mentat-dbmngr.py --command init
Added by Pavel Kácha over 3 years ago.
Updated over 3 years ago.
Category:
Development - Tools
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.
- 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.
- 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.
- 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.
- Status changed from Resolved to In Review
- Status changed from In Review to Closed
Also available in: Atom
PDF