• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • This community is user driven. Be polite with other users.
    • We recommend purchasing a Chevereto license to participate in this community.
    • Purchase a Community Subscription to get even faster ticket response times.
  • Chevereto Support CLST

    Support response

    Support checklist

    • Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • Confirm that the server meets the System Requirements
    • Check for any available Hotfix - your issue could be already reported/fixed
    • Read documentation - It will be required to Debug and understand Errors for a faster support response

Upgrade from v3.20.19 to v4.0.0 wrong table prefix detected on cli database update

lovedigit

👽 Chevereto Freak
▶ Reproduction steps
  • Remove app/vendor from your Chevereto V3 installation
  • Provide Chevereto V4 files on top of Chevereto V3 installation
  • Switch to PHP 8
  • Proceed with database update
😢 Unexpected result

The cli database update command app/bin/legacy -C update detects wrong table prefix even when table prefix is entered in env.php file.
This is the error shown when attempting to update database using cli command.

env.php file:
Note the table prefix is "lens_" in env file, but in error message it is looking for chv_

Code:
  GNU nano 6.2                                           app/env.php
<?php

return [
    'CHEVERETO_DB_HOST' => 'localhost',
    'CHEVERETO_DB_NAME' => 'redacted',
    'CHEVERETO_DB_PASS' => 'redacted',
    'CHEVERETO_DB_PORT' => '3306',
    'CHEVERETO_DB_USER' => 'redacted',
    'CHEVERETO_DB_TABLE_PREFIX' => 'lens_',
    'CHEVERETO_ENCRYPTION_KEY' => 'redacted',
];


📃 Error log message

Code:
PDOException thrown in /var/www/html/app/src/Legacy/G/DB.php:151

# Message [Code #42S02]
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'redacted.chv_albums' doesn't exist

# Incident ID:633856a6adf43

# Time
2022-10-01T15:03:02+00:00 [1664636582]

# Stack trace
------------------------------------------------------------
#0 /var/www/html/app/src/Legacy/G/DB.php:151
{main}()
------------------------------------------------------------
#1 /var/www//html/app/src/Legacy/G/DB.php:151
PDOStatement->execute()
------------------------------------------------------------
#2 /var/www/html/app/src/Legacy/G/DB.php:166
Chevereto\Legacy\G\DB->exec()
------------------------------------------------------------
#3 /var/www/html/app/src/Legacy/G/DB.php:222
Chevereto\Legacy\G\DB->fetchAll()
------------------------------------------------------------
#4 /var/www/html/app/src/Legacy/G/DB.php:209
Chevereto\Legacy\G\DB::queryFetch()
------------------------------------------------------------
#5 /var/www/html/app/legacy/install/installer.php:931
Chevereto\Legacy\G\DB::queryFetchAll()
------------------------------------------------------------
#6 /var/www/html/app/legacy/commands/update.php:18
require_once(string(length=55))
------------------------------------------------------------
#7 /var/www/html/app/legacy/entrypoints/cli.php:53
require_once(string(length=53))
------------------------------------------------------------
#8 /var/www/html/app/bin/legacy:13
require_once(string(length=53))
------------------------------------------------------------
 
Last edited:
Back
Top