- Issue created by @bogdog400
- πΊπΈUnited States bogdog400
Is it possible to change out the TINY size for the severity field:
https://api.drupal.org/api/drupal/core%21modules%21dblog%21dblog.install...
'severity' => [ 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny', 'description' => 'The severity level of the event; ranges from 0 (Emergency) to 7 (Debug)', ],
????
Look into the schema type mappings in core/modules/sqlite/src/Driver/Database/sqlite/Schema.php, in the getFieldTypeMap function.
- πΊπΈUnited States bogdog400
When I look there, I see a perfectly good mapping from 'tiny' to "INTEGER.'
This must be somewhere else.
'int:tiny' => 'INTEGER', 'int:small' => 'INTEGER', 'int:medium' => 'INTEGER', 'int:big' => 'INTEGER', 'int:normal' => 'INTEGER',
https://git.drupalcode.org/project/drupal/-/blob/11.x/core/modules/sqlit...
- π¬π§United Kingdom catch
Increasing priority in case this is affecting more installs.
- πΊπΈUnited States bogdog400
Does anyone have a suggestion for how I might turn off just this database update? Apparently it used to be possible to do focused updates with drush, but not any more.
TIA
- π¬π§United Kingdom catch
@bogdog400 if you just want to disable the update, add an early return (i.e.
return;
) at the top of the function, that way it will be registered as finished and won't run again. Obviously you're on your own for updating the dblog scheme in that case, but for dblog you could uninstall and re-install too. - πΊπΈUnited States bogdog400
Okay. I did that.
It looks like I'm okay until 2038 and the time coordinates get too long. At least that's my guess.
BTW, I looked at uninstalling dblog, but that option isn't available because it's greyed out. The check is locked.
Any suggestions for the best way to update this schema?
- π¬π§United Kingdom catch
Do you have any modules installed that depend on dblog? It should say why it can't be uninstalled.
Adding a related issue that appears to be the same error. Can you post which version of sqlite you have installed?
- πΊπΈUnited States bogdog400
It looks like the migrate module requires it.
Machine name: dblog Version: 10.1.0 Required by: Migrate Drupal UI (disabled)
But none of the migrate modules can be uninstalled. I'm not sure why.
Database Version 3.37.2
System SQLiteThx.
- πΊπΈUnited States bogdog400
Note: this documentation says that SQLite doesn't have a fixed length.
"In contrast, a SqlLite "integer" can hold whatever you put into it: from a 1-byte char to an 8-byte long long."
https://stackoverflow.com/questions/7337882/what-is-the-difference-betwe...
Does this affect this issue?
- π¬π§United Kingdom catch
@bogdog400 are you sure you're looking at the uninstall tab and not the main extend listing? You can only uninstall modules from the uninstall tab.
"In contrast, a SqlLite "integer" can hold whatever you put into it: from a 1-byte char to an 8-byte long long."
If this is the case it might be we should entirely skip this update on sqlite - i.e. even if it works flawlessly it'd be a no-op, but I haven't checked this since I'm not supposed to be working today.
- πΊπΈUnited States bogdog400
I put a screen shot below. THere's nothing to uninstall.
- First commit to issue fork.
- π³πΏNew Zealand quietone
@sonam_sharma, credit has been removed per How is credit granted for Drupal core issues β .
IIRC the uninstall UI cannot search by machine name. Try βdatabaseβ.
- π¦π·Argentina dagmar Argentina
So the problem here is with the update but not with the fresh install? We ran all the tests for Sqlite, Mysql and Postgres https://www.drupal.org/project/drupal/issues/3081144#comment-15012792 π Database primary keys can exceed maximum integer storeable (has actually occurred, in watchdog) Fixed is this a lack of tests?
- π¬π§United Kingdom catch
@bogdog400 can you tell us which sqlite version you're running? (from the status report, to ensure it's the one that PHP is actually using, sometimes there can be multiple sqlite versions on one machine).
- πΊπΈUnited States bogdog400
Version
3.37.2
of SQLiteHappy to run other tests too, but I'm on vacation next week.
- πΊπΈUnited States bogdog400
BTW, I'm running on an ARM server, in the odd case that might make a difference.
- π³πΏNew Zealand quietone
Over in π Update hook_schema for Y2038 Fixed daffie explains why it is not necessary to change the field definition for SQLlite integers. Their input starts at #19 and the summary is in #31. For me, that means that the
dblog_update_10101
should skip SQLlite as doesdblog_update_10100
Adding related issues, including #301038: Add a cross-compatible database schema introspection API β which is said to resolve this.
- Merge request !5459Resolve #3370560 "Update failed dblogupdate10101" β (Closed) created by quietone
- Status changed to Needs review
about 1 year ago 3:23am 18 November 2023 - π³πΏNew Zealand quietone
The failing tests are FunctionalJavascript one so probably random.
Drupal\Tests\settings_tray\FunctionalJavascript\SettingsTrayBlockFormTest::testBlocks
Failed asserting that a NULL is not empty. - Status changed to Needs work
about 1 year ago 11:35am 19 November 2023 - Status changed to Needs review
about 1 year ago 10:09am 20 November 2023 - π³πΏNew Zealand quietone
@daffie, thanks for the review!
I removed the skip so this test will run with all the dbs. Also, ran the tests for all the dbs as well.
Random fail in Drupal\Tests\field_ui\FunctionalJavascript\ManageFieldsTest
- Status changed to RTBC
about 1 year ago 1:59pm 20 November 2023 - π³π±Netherlands daffie
All the changes look good to me.
For me it is RTBC. - Status changed to Fixed
about 1 year ago 2:30pm 20 November 2023 - π¬π§United Kingdom catch
Committed/pushed to 11.x and cherry-picked to 10.2.x and 10.1.x, thanks!
Automatically closed - issue fixed for 2 weeks with no activity.