092941_create_references_table fail #3622

Closed
opened 2026-02-05 07:08:08 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @dkauper on GitHub (Mar 17, 2023).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

Using linuxserver.io docker in unRaid. Needed to restore a backup of docker.img and encountered the above fail after logging into bookstack but I'm presented with a blank white browser window. The following is the log entry below

Any suggestions for how to fix? The database seems intact...

Exact BookStack Version

latest stable

Log Content

text  error  warn  system  array  login  

[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] 02-default-location: skipped
[migrations] done
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗ 
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║      
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝ 

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    99
User GID:    100
───────────────────────────────────────

using keys found in /config/keys
App Key found - setting variable for seds
Running config - DB_HOST set
Waiting for DB to be available

   INFO  Running migrations.  

  2022_08_17_092941_create_references_table ......................... 4ms FAIL

   Illuminate\Database\QueryException 

  SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'references' already exists (SQL: create table `references` (`id` bigint unsigned not null auto_increment primary key, `from_id` int unsigned not null, `from_type` varchar(25) not null, `to_id` int unsigned not null, `to_type` varchar(25) not null) default character set utf8mb4 collate 'utf8mb4_unicode_ci')

  at /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:760
    756▕         // If an exception occurs when attempting to run a query, we'll format the error
    757▕         // message to include the bindings with SQL, which will make this exception a
    758▕         // lot more helpful to the developer instead of just the database's errors.
    759▕         catch (Exception $e) {
  ➜ 760▕             throw new QueryException(
    761▕                 $query, $this->prepareBindings($bindings), $e
    762▕             );
    763▕         }
    764▕     }

      +9 vendor frames 
  10  /app/www/database/migrations/2022_08_17_092941_create_references_table.php:22
      Illuminate\Support\Facades\Facade::__callStatic()

      +25 vendor frames 
  36  /app/www/artisan:37
      Illuminate\Foundation\Console\Kernel::handle()
[custom-init] No custom files found, skipping...
[ls.io-init] done.

PHP Version

No response

Hosting Environment

linuxserver bookstack docker on unRaid server

Originally created by @dkauper on GitHub (Mar 17, 2023). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario Using linuxserver.io docker in unRaid. Needed to restore a backup of docker.img and encountered the above fail after logging into bookstack but I'm presented with a blank white browser window. The following is the log entry below Any suggestions for how to fix? The database seems intact... ### Exact BookStack Version latest stable ### Log Content ``` text error warn system array login [migrations] started [migrations] 01-nginx-site-confs-default: skipped [migrations] 02-default-location: skipped [migrations] done ─────────────────────────────────────── ██╗ ███████╗██╗ ██████╗ ██║ ██╔════╝██║██╔═══██╗ ██║ ███████╗██║██║ ██║ ██║ ╚════██║██║██║ ██║ ███████╗███████║██║╚██████╔╝ ╚══════╝╚══════╝╚═╝ ╚═════╝ Brought to you by linuxserver.io ─────────────────────────────────────── To support LSIO projects visit: https://www.linuxserver.io/donate/ ─────────────────────────────────────── GID/UID ─────────────────────────────────────── User UID: 99 User GID: 100 ─────────────────────────────────────── using keys found in /config/keys App Key found - setting variable for seds Running config - DB_HOST set Waiting for DB to be available INFO Running migrations. 2022_08_17_092941_create_references_table ......................... 4ms FAIL Illuminate\Database\QueryException SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'references' already exists (SQL: create table `references` (`id` bigint unsigned not null auto_increment primary key, `from_id` int unsigned not null, `from_type` varchar(25) not null, `to_id` int unsigned not null, `to_type` varchar(25) not null) default character set utf8mb4 collate 'utf8mb4_unicode_ci') at /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:760 756▕ // If an exception occurs when attempting to run a query, we'll format the error 757▕ // message to include the bindings with SQL, which will make this exception a 758▕ // lot more helpful to the developer instead of just the database's errors. 759▕ catch (Exception $e) { ➜ 760▕ throw new QueryException( 761▕ $query, $this->prepareBindings($bindings), $e 762▕ ); 763▕ } 764▕ } +9 vendor frames 10 /app/www/database/migrations/2022_08_17_092941_create_references_table.php:22 Illuminate\Support\Facades\Facade::__callStatic() +25 vendor frames 36 /app/www/artisan:37 Illuminate\Foundation\Console\Kernel::handle() [custom-init] No custom files found, skipping... [ls.io-init] done. ``` ### PHP Version _No response_ ### Hosting Environment linuxserver bookstack docker on unRaid server
OVERLORD added the 🐕 Support label 2026-02-05 07:08:08 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#3622