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

feat: auto increment support #2882

Merged

Conversation

p5quared
Copy link
Contributor

@p5quared p5quared commented Sep 17, 2024

Description of changes

Transformer changes to support auto increment (serial) fields on Postgres datasources. Accomplished by making the 'create' input types optional when @default is applied.

  1. Definition of @default has changed, its value: String parameter is now optional.
  2. default-value-transformer allows no value on Int fields if the datasource is Postgres
  3. Unit tests for the above
CDK / CloudFormation Parameters Changed

n/a

Context

Original Project Outline

Design Doc

API Doc

Description of how you validated changes

Unit tests, existing e2e tests, testTransform. Will write e2e test after implementing changes to Lambda layer.

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Implements support for auto increment (serial) fields from Postgres
datasources. Such fields are denoted by an empty `@default` applied to
an `Int` field.
@p5quared p5quared marked this pull request as ready for review September 17, 2024 23:29
@p5quared p5quared requested a review from a team as a code owner September 17, 2024 23:29
@p5quared p5quared changed the base branch from main to auto-increment-support September 18, 2024 01:19
@p5quared p5quared merged commit 528716f into aws-amplify:auto-increment-support Sep 18, 2024
4 of 5 checks passed
@p5quared p5quared deleted the auto-increment-support branch September 18, 2024 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant