Skip to content

Add a primary key to 'password_resets' table to allow compatibility with MariaDB Galera.#727

Closed
iriseden wants to merge 4 commits intopelican-dev:mainfrom
iriseden:add/id_to_password_resets_table
Closed

Add a primary key to 'password_resets' table to allow compatibility with MariaDB Galera.#727
iriseden wants to merge 4 commits intopelican-dev:mainfrom
iriseden:add/id_to_password_resets_table

Conversation

@iriseden
Copy link
Copy Markdown

Compatibility with MariaDB Galera Cluster

Adds a id field as the primary key in the password_resets table.

A primary key is required on each table when using a clustered database with MariaDB Galera.

@github-actions

This comment was marked as resolved.

@iriseden

This comment was marked as resolved.

@iriseden iriseden force-pushed the add/id_to_password_resets_table branch from b1d331e to b18e6cf Compare November 26, 2024 14:35
@lancepioch lancepioch self-assigned this Nov 26, 2024
@rmartinoscar
Copy link
Copy Markdown
Member

rmartinoscar commented Nov 26, 2024

DELETE operations are unsupported on tables without a primary key. Also, rows in tables without a primary key may appear in a different order on different nodes. @mariadb

I believe its just if you are gonna get rid of password_resets which we don't.
Also we need to make the change for the following tables as well: egg_mount, mount_node, mount_server.

They only have unique index no primary key

@lancepioch
Copy link
Copy Markdown
Member

Thank you for the contribution, unfortunately I've thought about it and have decided against these changes.

One of the main reasons is that this table is a standard table with its structure coming from the standard laravel repository.

Luckily, you should be able to add a primary key to any tables missing one in your own application and there should be no issues with updating your application or database in the future.

@lancepioch lancepioch closed this Nov 30, 2024
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants