• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space
  • 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