You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MySQL DB cluster requires having primary keys for row replication. These aren't present in certain migrations.
Illuminate\Database\QueryException : SQLSTATE[HY000]: General error: 3750 Unable to create or change a table without a primary key, when the system variable 'sql_require_primary_key' is set. Add a primary key to the table or unset this variable to avoid this message. Note that tables without a primary key can cause performance problems in row-based replication, so please consult your DBA before changing this setting. (SQL: create table `password_resets` (`email` varchar(191) not null, `token` varchar(191) not null, `created_at` timestamp not null) default character set utf8mb4 collate 'utf8mb4_unicode_ci'),
Migration table created successfully.,
666| // message to include the bindings with SQL, which will make this exception a,
Migrating: 2014_10_12_000000_create_users_table,
Migrated: 2014_10_12_000000_create_users_table (0.14 seconds),
Migrating: 2014_10_12_100000_create_password_resets_table,
at /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:669,
/var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:119,
Please use the argument -v to see more details.,
2 Doctrine\DBAL\Driver\PDO\Exception::new(),
/var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18,
1 Doctrine\DBAL\Driver\PDO\Exception::("SQLSTATE[HY000]: General error: 3750 Unable to create or change a table without a primary key, when the system variable 'sql_require_primary_key' is set. Add a primary key to the table or unset this variable to avoid this message. Note that tables without a primary key can cause performance problems in row-based replication, so please consult your DBA before changing this setting."),
Exception trace:,
673|,
672| },
671| );,
670| $query, $this->prepareBindings($bindings), $e,
> 669| throw new QueryException(,
668| catch (Exception $e) {,
667| // lot more helpful to the developer instead of just the database's errors.,
665| // If an exception occurs when attempting to run a query, we'll format the error
Steps to Reproduce
Create a MySQL DB cluster (on DigitalOcean even single instance has the required settings)
Try to setup a instance of BookStack on the cluster
Expected Behaviour
To have primary keys in all tables during migrations, thus supporting MySQL 8 clustering.
Screenshots or Additional Context
No response
Exact BookStack Version
v21.10.03
PHP Version
No response
Hosting Environment
linuxserver.io docker image on debian and MySQL 8 DB cluster in DigitalOcean
The text was updated successfully, but these errors were encountered:
As per that thread, I don't really see this as a bug for this project since it's mostly down to the enforcement from a specific cloud vendor, or for a database feature we don't advertise to support. I'm not overly comfortable with the feature-set of specific vendors being the deciding factor in our efforts/support level. Looks like the framework we use did potentially look to make changes to support such environments but they were reverted due to bugs. Maybe something we could potentially support in the future but don't think we can easily support right now.
From what I've seen there looks like there are some workarounds or some people have managed to request the enforcement of primary keys be turned off in their environment. Otherwise will close this off.
Describe the Bug
MySQL DB cluster requires having primary keys for row replication. These aren't present in certain migrations.
Steps to Reproduce
Expected Behaviour
To have primary keys in all tables during migrations, thus supporting MySQL 8 clustering.
Screenshots or Additional Context
No response
Exact BookStack Version
v21.10.03
PHP Version
No response
Hosting Environment
linuxserver.io docker image on debian and MySQL 8 DB cluster in DigitalOcean
The text was updated successfully, but these errors were encountered: