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

Make ID field a UUID / replace by sodar_uuid #1471

Open
holtgrewe opened this issue Aug 23, 2024 · 0 comments
Open

Make ID field a UUID / replace by sodar_uuid #1471

holtgrewe opened this issue Aug 23, 2024 · 0 comments
Labels
breaking Breaking change, to be implemented and documented with care feature Requested feature or enhancement

Comments

@holtgrewe
Copy link
Member

Problem

All sodar-core based apps inherit the expected behaviour that id is a plain integer primary key while sodar_uuid is a UUID. The sodar_uuid is used for everything facing the outside world, in particular URLs and REST APIs. This behaviour works well for internal code but for code such as drf-writable-nested this is problematic.

Solution

Create migrations for the models that:

  • adjust foreign key columns to point to the sodar_uuid
  • drop the integer primary key column
  • rename sodar_uuid to the primary key column name

This is a huge change and should not be considered before a 2.0 version.

Alternative Solutions

N/A

Additional Context

@holtgrewe holtgrewe added the feature Requested feature or enhancement label Aug 23, 2024
@mikkonie mikkonie added the breaking Breaking change, to be implemented and documented with care label Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Breaking change, to be implemented and documented with care feature Requested feature or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants