Skip to content

spec(schema/mysql): define column option and mode contracts #453

Description

@scottescue

Outcome

Ratify the shared Go, snapshot, code-generation, and DDL contract for MySQL temporal, numeric, decimal, and integer column options before feature builders are implemented.

Context

The schema specification identifies FSP, precision/scale, unsigned, and upstream mode gaps but does not yet define all Go option shapes or mode-to-value mappings. Temporal, decimal, and bigint features must consume one consistent policy.

Decisions required

  • Typed option shapes and validation bounds for FSP, precision, scale, and unsigned.
  • timestamp, datetime, and date mode mappings to Go values/codecs.
  • decimal mode mappings and precision/scale interaction.
  • bigint mode and signed/unsigned Go representations, including overflow boundaries.
  • Snapshot fields, zero-value/omitted-option semantics, compatibility, and deterministic DDL ordering.
  • Behavior for existing PostgreSQL builder re-exports that cannot represent MySQL-specific options.

Out of scope

  • Implementing builders or code generation before ratification.
  • Query arithmetic and driver behavior unrelated to the selected column value representation.
  • Serial/autoincrement redesign.

Ratification criteria

  • schema.md, codegen.md, and types.md agree on every option and mode mapping.
  • Go option APIs, accepted bounds/combinations, and omitted-value behavior are explicit.
  • Snapshot representation and backward-compatibility rules have deterministic examples.
  • Generated Go values/codecs and MySQL DDL are specified for every mode and signedness choice.
  • Temporal, numeric/decimal, and integer implementation issues require no further public-policy decisions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:codegenTyped code generation (grizzle gen)area:schemaSchema DSL and type systempriority:highHigh: must ship within the current milestonestatus:iceboxValid but intentionally unscheduled worktype:specProduct or technical decision/specification work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions