-
Notifications
You must be signed in to change notification settings - Fork 1
Upgrade payload to v3.61.0 #629
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
Conversation
…s to match versions used by payload + updating format of logger.error usages
…fect function in color picker
|
Preview deployment: https://upgrade-payload.preview.avy-fx.org |
Migration Safety CheckFound 3 potential issues: 20251023_195638_rename_indexes.ts Warning (line 16): DROP keyword detected - review for data loss // Drop old indexes with _idx suffixWarning (line 17): DROP keyword detected - review for data loss await db.run(sql`DROP INDEX IF EXISTS \`roles_texts_order_parent_idx\`;`)Warning (line 18): DROP keyword detected - review for data loss await db.run(sql`DROP INDEX IF EXISTS \`global_roles_texts_order_parent_idx\`;`)Review these patterns and add backup/restore logic if needed. See |
Description
Upgrades to payload version 3.61.0.
Key Changes
pinoandpino-prettyversions with versions used by PayloadMigration explanation
Initially, Payload/Drizzle generated a huge migration with the create, drop, rename pattern that causes data loss in libSQL/Turso. So I wrote a simplified migration that just recreates indexes.
3.61.0 includes a change to how foreign keys and indexes are named. Full explanation in
src/migrations/20251023_195638_rename_indexes_explanation.mdSQLite apparently doesn't have named foreign keys so we don't need to change those, but we do need to maintain the generated snapshot JSON file so that
pnpm payload migrate:createdoesn't try to create the massive migration again in the future.I would love a careful review of my logic here by the team.
I ran this migration locally without issue.