Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.5.2] - 2026-05-07

### Fixed
- Fixed a bug in the global database sync script where molds whose ID had changed upstream (but retained the same name and brand) were being duplicated rather than having their updated flight numbers merged into the existing record.

## [0.5.1] - 2026-05-05

### Fixed
Expand Down
7 changes: 5 additions & 2 deletions src/app/actions/molds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,16 @@ export async function syncMolds() {
// unless they happen to match exactly by brand/name
const existing = await prisma.mold.findFirst({
where: {
id: disc.id
OR: [
{ id: disc.id },
{ name: disc.name, brand: disc.brand }
]
}
})

if (existing) {
await prisma.mold.update({
where: { id: disc.id },
where: { id: existing.id },
data: {
name: disc.name,
brand: disc.brand,
Expand Down
Loading