Starting from scratch trying to solve migrations mess, following this advice here.
A first step is to run php bin/console doctrine:migrations:migrate. I had earlier mentioned that I never have anything to migrate here, but I do get a list of stuff from 2015-2019. I always assumed these were just old archives, but scrolling up I see this message:
WARNING! You have 134 previously executed migrations in the database that are not registered migrations.
Googling that leads me here where @rcheesley explains ‘We had to make some decisions on how to handle old migrations and this is I believe a result of that’ - sounds solid!
Also this: ‘… we are going to be writing up some documentation on this for developers as it caused a bit of a problem for MariaDB users.’ What is the status of that? Where can I find that documentation? I am a MariaDB user. Sucks to be me?
She advices to run a database schema check when that shows up - which perhaps prompted someone else to advice to run doctrine:schema:update --force
If I try to update schema via the browser using /s/update/schema
as adviced, I get Database schema is already up-to-date
.
Should I ignore the error I get when I run doctrine:schema:update --force
? I am still stuck with this csv import problem that I assumed was related.
If that doesn’t solve the issue, rcheesley advices to look for outstanding database migrations with php bin/console doctrine:migration:status
This gives me the following useful looking info:
`
== Configuration
>> Name: Mautic Migrations
>> Database Driver: pdo_mysql
>> Database Host: localhost
>> Database Name: mymauticdb
>> Configuration Source: manually configured
>> Version Table Name: migrations
>> Version Column Name: version
>> Migrations Namespace: Mautic\Migrations
>> Migrations Directory: /home/myusername/public_html/mautic/app/migrations
>> Previous Version: 2021-06-23 07:13:26 (20210623071326)
>> Current Version: 2022-01-11 20:29:17 (20220111202917)
>> Next Version: Already at latest version
>> Latest Version: 2022-01-11 20:29:17 (20220111202917)
>> Executed Migrations: 181
>> Executed Unavailable Migrations: 134
>> Available Migrations: 47
>> New Migrations: 0
`
Are those 47 ‘Available Migrations’ supposed to run? When I hit ‘yes’ on doctrine:migrations:migrate
- ignoring the WARNING at the top… - I get No migrations to execute.
As usual, this is what I always get.
Is this an irrelevant tangent/dead-end/distraction? Moving back to the CSV import problem thread that lead me here…