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

Migrate from Long ids to UUIDs for student IDs #4

Open
sxflynn opened this issue Feb 29, 2024 · 0 comments
Open

Migrate from Long ids to UUIDs for student IDs #4

sxflynn opened this issue Feb 29, 2024 · 0 comments

Comments

@sxflynn
Copy link
Owner

sxflynn commented Feb 29, 2024

This is the current SQL table schema for students

CREATE TABLE "student" (
  "student_id" INT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
  "first_name" varchar(255) NOT NULL,
  "middle_name" varchar(255),
  "last_name" varchar(255) NOT NULL,
  "sex" char,
  "dob" date,
  "email" varchar UNIQUE,
  "ohio_ssid" varchar UNIQUE NOT NULL,
  CONSTRAINT "chk_ohio_ssid_format" CHECK ("ohio_ssid" ~ '^[A-Za-z]{2}[0-9]{7}$')
);

and the JPA entity

@Entity
@Table(name = "student")
public class Student {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "student_id")
    private Long studentId;

A PR should be submitted to migrate from regular int ids to UUIDs. This would involve making adjustments across the entire data lifecycle, from the SQL schema, to the JPA entities and related repositories/services/resolvers, to the GraphQL schema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant