Updating from 30.01 to last version #2071

Closed
opened 2026-02-05 02:48:54 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @EloFran on GitHub (Feb 3, 2021).

Describe the bug
Syntax error or access violation: 1091 Can't DROP COLUMN id

Steps To Reproduce
Steps to reproduce the behavior:

  1. git pull origin release && composer install --no-dev && php artisan migrate
  2. Updated
  3. Loading composer repositories with package information
    Installing dependencies from lock file
 Migrating: 2020_08_04_111754_drop_joint_permissions_id

   Illuminate\Database\QueryException  : SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP COLUMN `id`; check that it exists (SQL: alter table `joint_permissions` drop `id`)

  at /home/fiianiwg/libros.estudiaconelo.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php:669
    665|         // If an exception occurs when attempting to run a query, we'll format the error
    666|         // message to include the bindings with SQL, which will make this exception a
    667|         // lot more helpful to the developer instead of just the database's errors.
    668|         catch (Exception $e) {
  > 669|             throw new QueryException(
    670|                 $query, $this->prepareBindings($bindings), $e
    671|             );
    672|         }
    673|

  Exception trace:

  1   Doctrine\DBAL\Driver\PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP COLUMN `id`; check that itexists")
      /home/fiianiwg/libros.estudiaconelo.com/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:131

  2   PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP COLUMN `id`; check that it exists")
      /home/fiianiwg/libros.estudiaconelo.com/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:129

  Please use the argument -v to see more details. 

Expected behavior
Update BookStack at last version

Screenshots
image

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings): v0.30.3
  • PHP Version: 7.4
  • Hosting Method (Nginx/Apache/Docker): Apache

Additional context
Add any other context about the problem here.

Originally created by @EloFran on GitHub (Feb 3, 2021). **Describe the bug** **Syntax error or access violation: 1091 Can't DROP COLUMN `id`** **Steps To Reproduce** Steps to reproduce the behavior: 1. git pull origin release && composer install --no-dev && php artisan migrate 2. Updated 3. Loading composer repositories with package information Installing dependencies from lock file 4. ``` Migrating: 2020_08_04_111754_drop_joint_permissions_id Illuminate\Database\QueryException : SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP COLUMN `id`; check that it exists (SQL: alter table `joint_permissions` drop `id`) at /home/fiianiwg/libros.estudiaconelo.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php:669 665| // If an exception occurs when attempting to run a query, we'll format the error 666| // message to include the bindings with SQL, which will make this exception a 667| // lot more helpful to the developer instead of just the database's errors. 668| catch (Exception $e) { > 669| throw new QueryException( 670| $query, $this->prepareBindings($bindings), $e 671| ); 672| } 673| Exception trace: 1 Doctrine\DBAL\Driver\PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP COLUMN `id`; check that itexists") /home/fiianiwg/libros.estudiaconelo.com/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:131 2 PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP COLUMN `id`; check that it exists") /home/fiianiwg/libros.estudiaconelo.com/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:129 Please use the argument -v to see more details. ``` **Expected behavior** Update BookStack at last version **Screenshots** ![image](https://user-images.githubusercontent.com/37640520/106732236-bfe68e80-6610-11eb-996a-2ba80da20d0b.png) **Your Configuration (please complete the following information):** - Exact BookStack Version (Found in settings): v0.30.3 - PHP Version: 7.4 - Hosting Method (Nginx/Apache/Docker): Apache **Additional context** Add any other context about the problem here.
OVERLORD added the 🐕 Support label 2026-02-05 02:48:54 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Feb 4, 2021):

Hi @EloFran,
Sorry to hear you're having trouble. This is likely due to a database migration issue during your previous upgrade.

This should be repairable by running the MySQL commands in my first comment in this thread: https://github.com/BookStackApp/BookStack/issues/2317#issuecomment-707371525
Then re-run the update steps.

Just let me know if you need any further guidance on this.

@ssddanbrown commented on GitHub (Feb 4, 2021): Hi @EloFran, Sorry to hear you're having trouble. This is likely due to a database migration issue during your previous upgrade. This should be repairable by running the MySQL commands in my first comment in this thread: https://github.com/BookStackApp/BookStack/issues/2317#issuecomment-707371525 Then re-run the update steps. Just let me know if you need any further guidance on this.
Author
Owner

@EloFran commented on GitHub (Feb 5, 2021):

Very thx,
I followed the steps to rebuild the columns of the db, and for now everything is correct.

@EloFran commented on GitHub (Feb 5, 2021): Very thx, I followed the steps to rebuild the columns of the db, and for now everything is correct.
Author
Owner

@ssddanbrown commented on GitHub (Feb 5, 2021):

Good news! will therefore close this off.

@ssddanbrown commented on GitHub (Feb 5, 2021): Good news! will therefore close this off.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2071