Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
After a composer update, drush updatedb gives these errors :
> [notice] Update started: varbase_security_update_9001
> [error] The SQL storage cannot change the schema for an existing field (uid in user entity) with data.
> [error] Update failed: varbase_security_update_9001
and
[error] Update aborted by: varbase_security_update_9001
[error] Finished performing updates.
In the back-office of Drupal at admin/config/development/update-helper, I have pending updates that I cannot resolve/
Can somebody help me? Thank you
Proposed resolution
Remaining tasks
- ✅ File an issue about this project
- ✅ Addition/Change/Update/Fix to this project
- ✅ Testing to ensure no regression
- ➖ Automated unit/functional testing coverage
- ➖ Developer Documentation support on feature change/addition
- ➖ User Guide Documentation support on feature change/addition
- ➖ Update Release Notes and Update Helper on new feature change/addition
- ✅ Code review from 1 Varbase core team member
- ✅ Full testing and approval
- ✅ Credit contributors
- ✅ Review with the product owner
- ✅ Release varbase-9.0.5, varbase_core-9.0.14
Varbase update type:
- ✅ No Update
- ➖ Optional Update
- ➖ Forced Update
- ➖ Forced Update if Unchanged
User interface changes
- N/A
API changes
- N/A
Data model changes
- N/A
Comments
Comment #2
jeanpaulbouvet CreditAttribution: jeanpaulbouvet commentedOk, it seems that nobody hat the same problem and could help me.
The only way I've found to avoid the problem ist to uninstall varbase_security before upgrading the database.
But if I want to enable varbase_security after I've pending updates to do. So for the moment I don't use varbase_security.
Any help would be appreciated
Comment #3
jeanpaulbouvet CreditAttribution: jeanpaulbouvet commentedComment #4
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedThanks, Bouvet for reporting.
I confirm the issue.
Faced the issue when upgrading from Drupal 8 to Drupal 9.3.x
But not in Drupal 9.1.x or Drupal 9.2.x
I recommend to upgrade to Varbase 9.0.3 first .. then update to Varbase 9.0.4
Comment #5
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedJust to note that I had a full test on Updating Varbase 9.0.3 to Varbase 9.0.4
Before releasing Varbase 9.0.4
And listed the following in the release notes.
Updating Varbase 9.0.3 to Varbase 9.0.4
On navigating to "/update.php"
On navigating to "/admin/config/development/update-helper"
Then the Varbase update instructions are listed
Comment #6
jeanpaulbouvet CreditAttribution: jeanpaulbouvet commentedI resolved my problem but I'm not sure to understand how it works:
as there was this "SQL storage cannot change the schema for an existing field (uid in user entity)" I used devel_entity_updates
1 - make a drush updatedb
it gives you the error
[error] Update aborted by: varbase_security_update_9001
[error] Finished performing updates.
2 - drush entity-updates
[success] No entity schema updates required
3 - drush updatedb
the update of varbase_security_update_9001 is OK
Important: do not make a drush entity-updates before updating database -> it gives you an error "The SQL storage cannot change the schema for an existing field (uid in user entity) with data."
Comment #7
jeanpaulbouvet CreditAttribution: jeanpaulbouvet commentedForget my above comment. It doesn't work!
Thank you for your help, Rajab.
When I wrote my first comment, I had first upgraded from Drupal 9.2.8 to 9.3.2 (no problem) and from Varbase 9.0.2 to 9.0.4. (composer update) and had this [error] Update failed: varbase_security_update_9001.
I have tried this morning to start over with your Varbase update tool. ./bin/update-varbase.sh and have the same error.
The problem is with this tool I cannot forced a first upgrade to Varbase 9.0.3.
So I haved tried to update by hand:
composer require drupal/core-recommended:9.2.x --update-with-all-dependencies
but doing this I have an Upgrading vardot/varbase (9.0.2 => 9.0.4).
I'm new with composer. How do I do to upgrade to Varbase 9.0.3 first .. then update to Varbase 9.0.4?
Comment #8
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedBouvet, Thank you for following up.
Better direction is important, as you listed.
Devel Entity Updates has issues with every Drupal major release.
Having a quick fix release to fix the
varbase_security_update_9001
As you said on using the Devel Entity Updates command will fix some issues. But not all
Important to use for
field definitions are important, the order of updating them is important too.
Sometimes it's important to do that in a number of stages.
Varbase is using the Entity Definition Update Manager
varbase_security_update_9001
not bring SQL errors on updates to Varbase 9.04Comment #9
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedChange the logic in Update Steps in the Varbase Updater to force all upgrades from Drupal 8 to Drupal 9.2.x first, then Drupal 9.3.x #46
Comment #10
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedReleased Vardot/varbase-updater 2.0.27
https://packagist.org/packages/vardot/varbase-updater#2.0.27
Comment #11
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedComment #12
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedComment #15
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedComment #16
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedComment #17
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedComment #18
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedComment #19
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedComment #20
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedComment #21
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedComment #22
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedReleased Varbase Core 9.0.14
https://www.drupal.org/project/varbase_core/releases/9.0.14
Comment #24
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commented