Problem/Motivation
After applying #3179107 on an existing install, /admin/config/system/tacjs/overview crashes with this error:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'default.tacjslog' doesn't exist: SELECT COUNT(*) AS "expression"
FROM
(SELECT 1 AS "expression"
FROM
{tacjslog} "log") "subquery"; Array
(
)
That's because the table is not created for existing installs.
Steps to reproduce
- Install tacjs 5.0.0
- Switch to 5.x-dev
Proposed resolution
We should add a hook_update_N to create the table.
Remaining tasks
I will submit a patch.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | tacjs-3187255-4.patch | 781 bytes | gurvan |
| #3 | tacjs-3187255-3.patch | 1.45 KB | boulaffasae |
| #2 | tacjs-3187255-2.patch | 1.45 KB | prudloff |
Comments
Comment #2
prudloff commentedThis patch adds a hook that creates the table when updating the database.
Comment #3
boulaffasae commentedI got the following error:
Here is a an updated patch
Comment #6
boulaffasae commentedPatch to be ported.
Removed from 8.x-5.x
Comment #7
gurvan commentedJust a new patch for the 8.x-5.2 version (waiting for a new release)
Comment #9
boulaffasae commentedThank you prudloff, gurvan
Comment #10
eliechoufani commentedAlthough it is fixed, I'd like to add a useful info. You get the error if you are using MariaDB version < 10.3 because Default expression wasn't included for BLOB and TEXT type until version 10.3
Official version Improvements and new features document : https://mariadb.com/kb/en/incompatibilities-and-feature-differences-betw...
Thank you.