What happened?
Description
Following on from #15322 (comment)
Running craft up does not apply project config changes after importing an older DB because the config files haven't changed since they were last changed, even though they are now out of sync with the DB. This is due to the modified time of config/project/project.yaml being cached in storage/runtime/cache, and can be avoided by running craft clear-caches/data before running craft up.
Steps to reproduce
- Import a DB from production
- Run
craft pc/apply in case your branch isn't in sync with the DB
- Run
craft db/backup
- Make a project config change - eg. change a section's handle
- Restore the DB from step 3
- Run
craft up
Expected behavior
Section's handle should be updated, craft up should output something like
Checking for pending Craft and plugin migrations ...
No new migrations found. Your system is up to date.
Applying changes from your project config files ...
- updating sections.2fe89ea4-87e0-476a-b167-ada05b0d3313 ... done
- updating dateModified ... done
Finished applying changes
Checking for pending content migrations ...
No new migrations found. Your system is up-to-date.
Actual behavior
Section's handle isn't updated, craft up outputs
Checking for pending Craft and plugin migrations ...
No new migrations found. Your system is up to date.
Checking for pending content migrations ...
No new migrations found. Your system is up-to-date.
Running craft pc/diff also shows no differences until you run craft clear-caches/data
Craft CMS version
5.5.0.1
PHP version
8.2.20
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
What happened?
Description
Following on from #15322 (comment)
Running
craft updoes not apply project config changes after importing an older DB because the config files haven't changed since they were last changed, even though they are now out of sync with the DB. This is due to the modified time ofconfig/project/project.yamlbeing cached instorage/runtime/cache, and can be avoided by runningcraft clear-caches/databefore runningcraft up.Steps to reproduce
craft pc/applyin case your branch isn't in sync with the DBcraft db/backupcraft upExpected behavior
Section's handle should be updated,
craft upshould output something likeActual behavior
Section's handle isn't updated,
craft upoutputsRunning
craft pc/diffalso shows no differences until you runcraft clear-caches/dataCraft CMS version
5.5.0.1
PHP version
8.2.20
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions