Fix tests and add changelog

This commit is contained in:
2026-01-04 21:33:10 +01:00
parent f0b41572bc
commit a154192410
56 changed files with 4464 additions and 236 deletions

View File

@@ -0,0 +1,34 @@
import { PrismaClient } from '@prisma/client'
const prisma = new PrismaClient()
async function fixOrder() {
try {
// Get all notes sorted by creation date
const notes = await prisma.note.findMany({
orderBy: [
{ isPinned: 'desc' },
{ createdAt: 'asc' }
]
})
console.log(`Found ${notes.length} notes`)
// Update order values
for (let i = 0; i < notes.length; i++) {
await prisma.note.update({
where: { id: notes[i].id },
data: { order: i }
})
console.log(`Updated note ${notes[i].id} - order: ${i}`)
}
console.log('✅ Order values fixed!')
} catch (error) {
console.error('Error:', error)
} finally {
await prisma.$disconnect()
}
}
fixOrder()