Skip to content

uuid column type differs between the mysql and aurora-data-api (mysql) drivers #8286

Closed as not planned

Description

@mpvosseller

Issue Description

The mysql driver and the aurora-data-api driver (for mysql) use different database column types for uuid fields. The mysql driver uses char while the aurora-data-api driver uses varchar.

Seems to me that since both drivers connect to a MySQL database the generated schemas should be identical regardless of which driver is used.

The change occurred in the 0.2.35 release via PR 7853 and is discussed in Issue 7228

Expected Behavior

I expected the mysql driver and the aurora-data-api driver to use the same column types for uuid fields.

Actual Behavior

The mysql driver uses char for uuid fields and the aurora-data-api driver uses varchar for uuid fields.

Steps to Reproduce

  1. Create an entity that uses a uuid field
@Entity()
export class User {
  @PrimaryGeneratedColumn('uuid')
  id!: string
}
  1. Connect to a mysql database with the mysql driver and observe the column uses char(36)
  2. Connect to a mysql database with the aurora-data-api driver and observe the column uses varchar(36)

My Environment

Dependency Version
Operating System
Node.js version 14.17.4
Typescript version 4.4.4
TypeORM version 0.2.38
typeorm-aurora-data-api-driver 2.3.4

Additional Context

Relevant Database Driver(s)

DB Type Reproducible
aurora-data-api yes
aurora-data-api-pg no
better-sqlite3 no
cockroachdb no
cordova no
expo no
mongodb no
mysql yes
nativescript no
oracle no
postgres no
react-native no
sap no
sqlite no
sqlite-abstract no
sqljs no
sqlserver no

Are you willing to resolve this issue by submitting a Pull Request?

  • ✖️ Yes, I have the time, and I know how to start.
  • ✅ Yes, I have the time, but I don't know how to start. I would need guidance.
  • ✖️ No, I don’t have the time, but I can support (using donations) development.
  • ✖️ No, I don’t have the time and I’m okay to wait for the community / maintainers to resolve this issue.

I'm happy to make the one line change in the aurora-data-api driver (to make it match mysql) and update any tests. This seems like a breaking change though and it's unclear if / how a complete change should be made.

Activity

  1. github-actions commented on Sep 18, 2025

    @github-actions

    TypeORM has returned to active development after recently transitioning to new leadership (see related announcement).

    As part of the new team's efforts to prioritise work on the project moving forward, it is necessary to clean up the backlog of stale issues.

    🧹 This issue is being automatically closed because it has had no activity in the last 6 months.
    If you believe this issue is still relevant, feel free to comment below and the maintainers may reopen it. Thank you for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions