An unknown error occurred while creating book. #587

Closed
opened 2026-02-04 21:20:14 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @S1AnGeR on GitHub (Mar 2, 2018).

For Bug Reports

  • BookStack Version v0.20.0
  • PHP Version: 7.1-x64
  • MySQL Version: MariaDB-10.2-x64
Expected Behavior

ADD Book

Current Behavior

An unknown error occurred

[2018-03-02 14:45:51] production.ERROR: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'image_id' in 'field list' (SQL: insert into books (name, description, image_id, slug, created_by, updated_by, updated_at, created_at) values (test, test, http://bookstack/public/book_default_cover.png, test, 1, 1, 2018-03-02 14:45:51, 2018-03-02 14:45:51)) {"userId":1,"email":"admin@admin.com","exception":"[object] (Illuminate\\Database\\QueryException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'image_id' in 'field list' (SQL: insert into books (name, description, image_id, slug, created_by, updated_by, updated_at, created_at) values (test, test, http://bookstack/public/book_default_cover.png, test, 1, 1, 2018-03-02 14:45:51, 2018-03-02 14:45:51)) at D:\\OSPanel\\domains\\BookStack\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Connection.php:664, PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'image_id' in 'field list' at D:\\OSPanel\\domains\\BookStack\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Connection.php:452) [stacktrace]

Steps to Reproduce

Install on server manually, login as admin , try create book.
I think maybe this problem with migrations. Looks like column 'image_id' doesn't exist.

Originally created by @S1AnGeR on GitHub (Mar 2, 2018). ### For Bug Reports * BookStack Version v0.20.0 * PHP Version: 7.1-x64 * MySQL Version: MariaDB-10.2-x64 ##### Expected Behavior ADD Book ##### Current Behavior **An unknown error occurred** `[2018-03-02 14:45:51] production.ERROR: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'image_id' in 'field list' (SQL: insert into `books` (`name`, `description`, `image_id`, `slug`, `created_by`, `updated_by`, `updated_at`, `created_at`) values (test, test, http://bookstack/public/book_default_cover.png, test, 1, 1, 2018-03-02 14:45:51, 2018-03-02 14:45:51)) {"userId":1,"email":"admin@admin.com","exception":"[object] (Illuminate\\Database\\QueryException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'image_id' in 'field list' (SQL: insert into `books` (`name`, `description`, `image_id`, `slug`, `created_by`, `updated_by`, `updated_at`, `created_at`) values (test, test, http://bookstack/public/book_default_cover.png, test, 1, 1, 2018-03-02 14:45:51, 2018-03-02 14:45:51)) at D:\\OSPanel\\domains\\BookStack\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Connection.php:664, PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'image_id' in 'field list' at D:\\OSPanel\\domains\\BookStack\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Connection.php:452) [stacktrace]` ##### Steps to Reproduce Install on server manually, login as admin , try create book. I think maybe this problem with migrations. Looks like column 'image_id' doesn't exist.
Author
Owner

@Abijeet commented on GitHub (Mar 3, 2018):

Yes, it does look like one of the migrations failed, the very last one specifically (https://github.com/BookStackApp/BookStack/blob/master/database/migrations/2017_08_29_102650_add_cover_image_display.php).

Did you update recently? If so, did you run the migrations?

Try running them again, and let us know what happens.

@Abijeet commented on GitHub (Mar 3, 2018): Yes, it does look like one of the migrations failed, the very last one specifically (https://github.com/BookStackApp/BookStack/blob/master/database/migrations/2017_08_29_102650_add_cover_image_display.php). Did you update recently? If so, did you run the migrations? Try running them again, and let us know what happens.
Author
Owner

@S1AnGeR commented on GitHub (Mar 4, 2018):

Yes , I'm running migrations again - it works. Thanks.

@S1AnGeR commented on GitHub (Mar 4, 2018): Yes , I'm running migrations again - it works. Thanks.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#587