Skip to content

Conversation

@ppcano
Copy link
Collaborator

@ppcano ppcano commented Nov 27, 2025

No description provided.

Migrations.MustRegister(func(ctx context.Context, db *bun.DB) error {
fixture := dbfixture.New(db)
return fixture.Load(context.Background(), f, "testdata.yaml")
if err := fixture.Load(ctx, f, "testdata.yaml"); err != nil {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@theSuess, this adds three initial “fixture” pizzas in Postgres, but it doesn’t update the auto-incrementing id sequence.

As a result, the first three calls to generate pizzas fail because their ids (1, 2, and 3) are already present in the DB.

This change fixes that by updating the sequence in Postgres.

Feel free to tweak this if you know a better or more idiomatic way to handle it.

@ppcano ppcano marked this pull request as ready for review December 1, 2025 15:36
@ppcano ppcano requested a review from a team as a code owner December 1, 2025 15:36
@ppcano ppcano merged commit 43133ae into main Dec 1, 2025
14 checks passed
@ppcano ppcano deleted the pepe/add-db branch December 1, 2025 15:41
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

Successfully merging this pull request may close these issues.

1 participant