BookStackApp / BookStack

A platform to create documentation/wiki content built with PHP & Laravel
https://www.bookstackapp.com/
MIT License
14.37k stars 1.82k forks source link

Problem with my table and my connection #4708

Closed RoccoZ9 closed 7 months ago

RoccoZ9 commented 7 months ago

Attempted Debugging

Searched GitHub Issues

Describe the Scenario

Hi i'm using the linuxserver/bookstack: https://hub.docker.com/r/linuxserver/bookstack to have bookstack i copy and paste the docker compose after add the column that in my log in bookstack said that i do not have i have this error SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'type' (SQL: ALTER TABLE activities CHANGE key type INT DEFAULT NULL) 2023-12-04 10:27:38 2023-12-04 10:27:38 at /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:760 2023-12-04 10:27:38 756▕ // If an exception occurs when attempting to run a query, we'll format the error 2023-12-04 10:27:38 757▕ // message to include the bindings with SQL, which will make this exception a 2023-12-04 10:27:38 758▕ // lot more helpful to the developer instead of just the database's errors. 2023-12-04 10:27:38 759▕ catch (Exception $e) { 2023-12-04 10:27:38 ➜ 760▕ throw new QueryException( 2023-12-04 10:27:38 761▕ $query, $this->prepareBindings($bindings), $e 2023-12-04 10:27:38 762▕ ); 2023-12-04 10:27:38 763▕ } 2023-12-04 10:27:38 764▕ } 2023-12-04 10:27:38 2023-12-04 10:27:38 +9 vendor frames 2023-12-04 10:27:38 10 /app/www/database/migrations/2020_11_07_232321_simplify_activities_table.php:17 2023-12-04 10:27:38 Illuminate\Support\Facades\Facade::__callStatic() 2023-12-04 10:27:38 2023-12-04 10:27:38 +25 vendor frames 2023-12-04 10:27:38 36 /app/www/artisan:35 2023-12-04 10:27:38 Illuminate\Foundation\Console\Kernel::handle() 2023-12-04 10:27:38 [custom-init] No custom files found, skipping... 2023-12-04 10:27:38 [ls.io-init] done. I have try to change key in boolean and varchar no difference so what i need to do?

Exact BookStack Version

default latest

Log Content

THIS IS MY BOOKSTACK LOG GID/UID 2023-12-04 10:27:35 ─────────────────────────────────────── 2023-12-04 10:27:35 2023-12-04 10:27:35 User UID: 1000 2023-12-04 10:27:35 User GID: 1000 2023-12-04 10:27:35 ─────────────────────────────────────── 2023-12-04 10:27:35 2023-12-04 10:27:35 using keys found in /config/keys 2023-12-04 10:27:36 App Key found - setting variable for seds 2023-12-04 10:27:36 Running config - DB_HOST set 2023-12-04 10:27:36 Waiting for DB to be available 2023-12-04 10:27:38 2023-12-04 10:27:38 INFO Running migrations.
2023-12-04 10:27:38 2023-12-04 10:27:38 2020_11_07_232321_simplify_activities_table ..................... 321ms FAIL 2023-12-04 10:27:38 2023-12-04 10:27:38 Illuminate\Database\QueryException 2023-12-04 10:27:38 2023-12-04 10:27:38 SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'type' (SQL: ALTER TABLE activities CHANGE key type INT DEFAULT NULL) 2023-12-04 10:27:38 2023-12-04 10:27:38 at /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:760 2023-12-04 10:27:38 756▕ // If an exception occurs when attempting to run a query, we'll format the error 2023-12-04 10:27:38 757▕ // message to include the bindings with SQL, which will make this exception a 2023-12-04 10:27:38 758▕ // lot more helpful to the developer instead of just the database's errors. 2023-12-04 10:27:38 759▕ catch (Exception $e) { 2023-12-04 10:27:38 ➜ 760▕ throw new QueryException( 2023-12-04 10:27:38 761▕ $query, $this->prepareBindings($bindings), $e 2023-12-04 10:27:38 762▕ ); 2023-12-04 10:27:38 763▕ } 2023-12-04 10:27:38 764▕ } 2023-12-04 10:27:38 2023-12-04 10:27:38 +9 vendor frames 2023-12-04 10:27:38 10 /app/www/database/migrations/2020_11_07_232321_simplify_activities_table.php:17 2023-12-04 10:27:38 Illuminate\Support\Facades\Facade::__callStatic() 2023-12-04 10:27:38 2023-12-04 10:27:38 +25 vendor frames 2023-12-04 10:27:38 36 /app/www/artisan:35 2023-12-04 10:27:38 Illuminate\Foundation\Console\Kernel::handle() 2023-12-04 10:27:38 [custom-init] No custom files found, skipping... 2023-12-04 10:27:38 [ls.io-init] done. I already tried to change key in boolean and varchar

THIS IS MY BOOKSTACK_DB LOG

Brought to you by linuxserver.io 2023-12-04 10:27:34 ─────────────────────────────────────── 2023-12-04 10:27:34 2023-12-04 10:27:34 To support LSIO projects visit: 2023-12-04 10:27:34 https://www.linuxserver.io/donate/ 2023-12-04 10:27:34 2023-12-04 10:27:34 ─────────────────────────────────────── 2023-12-04 10:27:34 GID/UID 2023-12-04 10:27:34 ─────────────────────────────────────── 2023-12-04 10:27:34 2023-12-04 10:27:34 User UID: 1000 2023-12-04 10:27:34 User GID: 1000 2023-12-04 10:27:34 ─────────────────────────────────────── 2023-12-04 10:27:34 2023-12-04 10:27:34 [custom-init] No custom files found, skipping... 2023-12-04 10:27:34 231204 10:27:34 mysqld_safe Logging to '/config/databases/46987b1c16f7.err'. 2023-12-04 10:27:34 231204 10:27:34 mysqld_safe Starting mariadbd daemon with databases from /config/databases 2023-12-04 10:27:35 [ls.io-init] done.

Hosting Environment

Docker-compose yml with VISUAL STUDIO CODE

RoccoZ9 commented 7 months ago

Solved

ssddanbrown commented 7 months ago

Since this is reported solved I'll close it off.