Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

members.uuid is marked as nullable in database schema #22077

Open
1 task done
nikwen opened this issue Jan 29, 2025 · 1 comment
Open
1 task done

members.uuid is marked as nullable in database schema #22077

nikwen opened this issue Jan 29, 2025 · 1 comment
Labels
server / core Issues relating to the server or core of Ghost

Comments

@nikwen
Copy link

nikwen commented Jan 29, 2025

Issue Summary

#11341 introduced UUIDs for members.

It introduced a migration to backfill UUIDs for existing members, and introduced defaults so that each new member would have a UUID.

It seems to me like the database schema should be adjusted to mark the members.uuid column as nullable: false.

When #14600 introduced UUIDs for newsletters, it included a migration to drop nullable from the new newsletters.uuid column. A similar migration could probably be created for the members table.

Steps to Reproduce

  1. Look at the schema here:
    uuid: {type: 'string', maxlength: 36, nullable: true, unique: true, validations: {isUUID: true}},

Ghost Version

5.108.1

Node.js Version

20.18.1

How did you install Ghost?

Irrelevant for the issue

Database type

MySQL 5.7

Browser & OS version

No response

Relevant log / error output

Code of Conduct

  • I agree to be friendly and polite to people in this repository
@github-actions github-actions bot added the needs:triage [triage] this needs to be triaged by the Ghost team label Jan 29, 2025
@sagzy
Copy link
Contributor

sagzy commented Jan 30, 2025

Great find, and very valid! Thank you for opening the issue 🙌

@sagzy sagzy added server / core Issues relating to the server or core of Ghost and removed needs:triage [triage] this needs to be triaged by the Ghost team labels Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
server / core Issues relating to the server or core of Ghost
Projects
None yet
Development

No branches or pull requests

2 participants