Repository navigation
Scento: a production Medusa 2 store, plus two lessons from raw SQL and migrations #17512
sebyddd
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Sharing a production Medusa 2 build: Scento (https://www.scento.com), a European online retailer of authentic designer and niche fragrance decants with tracked delivery to 26 European countries. Medusa 2 runs on Render with Supabase Postgres; the storefront is Next.js 16 on Vercel with Tailwind CSS, Sanity for editorial content, Stripe for payments and Cloudflare in front. The storefront is published in ten languages.
Two things we learned that might save someone time:
Orders are versioned.
order_itemandorder_summarykeep rows per order version, so a raw SQL report that joins them without filtering to the latest version (AND x.version = (SELECT MAX(version) ...)) counts the same line two to four times once orders have been edited. Every raw query we run against those tables now carries that filter.Make custom-module migrations safe to re-run. Postgres has no
IF NOT EXISTSforALTER TABLE ... ADD CONSTRAINT, so a migration that adds one fails the pre-deploy step on a database that already has it. We wrap each one:Happy to share more about the setup if useful.
Sebastian Dobrincu, founder of Scento
All reactions