Skip to content

feat(schema/mysql): add integer unsigned and mode options #452

Description

@scottescue

Outcome

MySQL int, bigint, mediumint, smallint, and tinyint builders expose correct unsigned behavior and the documented bigint mode mapping.

Context

Several builders are re-exported from PostgreSQL or implement only signed values, so the current DSL cannot represent MySQL unsigned DDL and generated Go types consistently.

In scope

  • Unsigned options for int, bigint, mediumint, smallint, and tinyint.
  • Bigint value-mode mapping.
  • Snapshot representation, generated signed/unsigned Go types, and deterministic MySQL DDL.
  • Range/default validation where signedness changes accepted values.

Out of scope

  • Serial/autoincrement redesign.
  • Floating, decimal, or temporal options.
  • Driver codec work beyond the selected schema value representation.

Acceptance criteria

  • Every named integer builder exposes the documented typed unsigned option; bigint also exposes the ratified mode.
  • Signed/unsigned defaults and ranges validate before snapshot or SQL generation.
  • Snapshots and generated Go types preserve signedness/mode deterministically.
  • MySQL DDL renders unsigned in the normative position and leaves signed output unchanged.
  • Tests cover each builder, signed/unsigned boundaries, bigint modes, invalid values, and round trips.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:schemaSchema DSL and type systemenhancementNew feature or requestpriority:mediumMedium: important but not blockingstatus:iceboxValid but intentionally unscheduled work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions