Error on migration to 25.11 #5497

Closed
opened 2026-02-05 10:07:03 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @csequino on GitHub (Nov 14, 2025).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

I updated from version 25.07.3 to version 25.11, but when I run php artisan migrate I get an SQL error for the migration: 2025_09_15_132850_create_entities_table caused by the multiple primary key in the entities table.

Exact BookStack Version

v25.11

Log Content

SQLSTATE[42000]: Syntax error or access violation: 1068 Multiple primary key defined (Connection: mysql, SQL: create table `entities` (`id` bigint unsigned not null auto_increment primary key, `type` varchar(10) not null, `name` va
  rchar(191) not null, `slug` varchar(191) not null, `book_id` bigint unsigned null, `chapter_id` bigint unsigned null, `priority` int unsigned null, `created_at` timestamp null, `updated_at` timestamp null, `deleted_at` timestamp nu
  ll, `created_by` int unsigned null, `updated_by` int unsigned null, `owned_by` int unsigned null, primary key (`id`, `type`)) default character set utf8mb4 collate 'utf8mb4_unicode_ci')

Hosting Environment

PHP 8.3.24, MariaDB 10.5.29

Originally created by @csequino on GitHub (Nov 14, 2025). ### Attempted Debugging - [x] I have read the debugging page ### Searched GitHub Issues - [x] I have searched GitHub for the issue. ### Describe the Scenario I updated from version 25.07.3 to version 25.11, but when I run `php artisan migrate` I get an SQL error for the migration: 2025_09_15_132850_create_entities_table caused by the multiple primary key in the `entities` table. ### Exact BookStack Version v25.11 ### Log Content ```text SQLSTATE[42000]: Syntax error or access violation: 1068 Multiple primary key defined (Connection: mysql, SQL: create table `entities` (`id` bigint unsigned not null auto_increment primary key, `type` varchar(10) not null, `name` va rchar(191) not null, `slug` varchar(191) not null, `book_id` bigint unsigned null, `chapter_id` bigint unsigned null, `priority` int unsigned null, `created_at` timestamp null, `updated_at` timestamp null, `deleted_at` timestamp nu ll, `created_by` int unsigned null, `updated_by` int unsigned null, `owned_by` int unsigned null, primary key (`id`, `type`)) default character set utf8mb4 collate 'utf8mb4_unicode_ci') ``` ### Hosting Environment PHP 8.3.24, MariaDB 10.5.29
OVERLORD added the 🐕 Support label 2026-02-05 10:07:03 +03:00
Author
Owner

@csequino commented on GitHub (Nov 15, 2025):

Analyzing the system logs, I realized that the command: composer install --no-dev had not been executed correctly.
I managed to execute the command correctly and the migration was completed successfully.

@csequino commented on GitHub (Nov 15, 2025): Analyzing the system logs, I realized that the command: `composer install --no-dev` had not been executed correctly. I managed to execute the command correctly and the migration was completed successfully.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#5497