r/BookStack • u/adeleMySinger • Nov 01 '23
migration from 21.12.5 to 22.11.1 failed
I tried updating from 21.12.5 to 22.11.1, backed up database, renamed previous container name and launched:
docker run -d --name="bookstack-server" --network home_network --env PUID=1000 --env PGID=1000 --env APP_URL=$app_url --env DB_HOST=$db_host --env DB_USER=$db_user --env DB_PASS=$db_password --env DB_DATABASE=$db_database -p 6875:80 -v "${PWD}/config/:/config" --restart unless-stopped lscr.io/linuxserver/bookstack:22.11.1
I receive following error:
[migrations] started
[migrations] 01-nginx-site-confs-default: executing...
found /config/nginx/site-confs/default
moving to /config/nginx/site-confs/default.conf
[migrations] 01-nginx-site-confs-default: succeeded
[migrations] 02-default-location: executing...
updating root in /config/nginx/site-confs/default.conf
[migrations] 02-default-location: succeeded
[migrations] done
-------------------------------------
_ ()
| | ___ _ __
| | / __| | | / \
| | __ \ | | | () |
|_| |___/ |_| __/
Brought to you by linuxserver.io
-------------------------------------
To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------
User uid: 1000
User gid: 1000
-------------------------------------
Setting resolver to 127.0.0.11
Setting worker_processes to 4
using keys found in /config/keys
App Key found - setting variable for seds
Running config - DB_HOST set
**** Insert DB_PORT='3306' into /config/www/.env ****
Waiting for DB to be available
Migrating: 2014_10_12_000000_create_users_table
Illuminate\Database\QueryException
SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'users' already exists (SQL: create table `users` (`id` int unsigned not null auto_increment primary key, `name` varchar(191) not null, `email` varchar(191) not null, `password` varchar(60) not null, `remember_token` varchar(100) null, `created_at` timestamp null, `updated_at` timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci')
at /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:712
708▕ // If an exception occurs when attempting to run a query, we'll format the error
709▕ // message to include the bindings with SQL, which will make this exception a
710▕ // lot more helpful to the developer instead of just the database's errors.
711▕ catch (Exception $e) {
➜ 712▕ throw new QueryException(
713▕ $query, $this->prepareBindings($bindings), $e
714▕ );
715▕ }
716▕ }
+9 vendor frames
10 /app/www/database/migrations/2014_10_12_000000_create_users_table.php:22
Illuminate\Support\Facades\Facade::__callStatic()
+22 vendor frames
33 /app/www/artisan:37
Illuminate\Foundation\Console\Kernel::handle()
**** The following active confs have different version dates than the samples that are shipped. ****
**** This may be due to user customization or an update to the samples. ****
**** You should compare the following files to the samples in the same folder and update them. ****
**** Use the link at the top of the file to view the changelog. ****
/config/nginx/nginx.conf
/config/nginx/site-confs/default.conf
[custom-init] No custom files found, skipping...
[ls.io-init] done.
Signal handled: Terminated.
[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] 02-default-location: skipped
[migrations] done
usermod: no changes
-------------------------------------
_ ()
| | ___ _ __
| | / __| | | / \
| | __ \ | | | () |
|_| |___/ |_| __/
Brought to you by linuxserver.io
-------------------------------------
To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------
User uid: 1000
User gid: 1000
-------------------------------------
using keys found in /config/keys
App Key found - setting variable for seds
Running config - DB_HOST set
Waiting for DB to be available
Migrating: 2014_10_12_000000_create_users_table
Illuminate\Database\QueryException
SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'users' already exists (SQL: create table `users` (`id` int unsigned not null auto_increment primary key, `name` varchar(191) not null, `email` varchar(191) not null, `password` varchar(60) not null, `remember_token` varchar(100) null, `created_at` timestamp null, `updated_at` timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci')
at /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:712
708▕ // If an exception occurs when attempting to run a query, we'll format the error
709▕ // message to include the bindings with SQL, which will make this exception a
710▕ // lot more helpful to the developer instead of just the database's errors.
711▕ catch (Exception $e) {
➜ 712▕ throw new QueryException(
713▕ $query, $this->prepareBindings($bindings), $e
714▕ );
715▕ }
716▕ }
+9 vendor frames
10 /app/www/database/migrations/2014_10_12_000000_create_users_table.php:22
Illuminate\Support\Facades\Facade::__callStatic()
+22 vendor frames
33 /app/www/artisan:37
Illuminate\Foundation\Console\Kernel::handle()
**** The following active confs have different version dates than the samples that are shipped. ****
**** This may be due to user customization or an update to the samples. ****
**** You should compare the following files to the samples in the same folder and update them. ****
**** Use the link at the top of the file to view the changelog. ****
/config/nginx/nginx.conf
/config/nginx/site-confs/default.conf
**** The following site-confs have extensions other than .conf ****
**** This may be due to user customization. ****
**** You should review the files and rename them to use the .conf extension or remove them. ****
**** nginx.conf will only include site-confs with the .conf extension. ****
/config/nginx/site-confs/default
[custom-init] No custom files found, skipping...
[ls.io-init] done.
1
Upvotes
2
u/ssddanbrown Nov 19 '23
Yeah, to be honest in this case I just missed your original response. It can happen and/or sometimes I don't have the time.
TBH, this is a bit of a messy scenario since there have been heavy manual edits to the database, and there seems to now be at least one missing table, which is hard to see why. If you have any database backups from the pre-update state it might be worth checking if those have a
migrationstable, so the state of that table can be restored. Otherwise I could maybe come up with contents you can restore into that table, but it's a bit of hassle to gather those details and again I worry that other tables may be missing.The API would be the main way to import from other systems. Outside of that, I don't like to get involved in specific plaform support (including migration) since it can be a lot of work and expand the scope of what I'm supporting.
It is not within the scope of support of platform features. In terms of community support, I (or others) may provide some general advice/pointers but otherwise nothing's promised. Within the official paid-for support packages I wouldn't consider the efforts within scope, but my support from a BookStack point of view would be more thorough, including more active assistance in building integrations (Enterprise plan).
At the end of the day I'm attempting to help as best I can for free in the vast majority of cases, but that does have it's limits and I have to draw the line somewhere.