supabase icon indicating copy to clipboard operation
supabase copied to clipboard

fix: handle studio sql export edge cases

Open QuinnStraus opened this issue 1 year ago • 3 comments

I have read the CONTRIBUTING.md file.

YES

What kind of change does this PR introduce?

Bug fix for the SQL export feature in Supabase studio

What is the current behavior?

SQL export does not handle apostrophes correctly and has issues with JSON and array fields. This leads to broken sql that cannot run or which produces a different result than the original data.

Related to #30165

What is the new behavior?

SQL export will generate correct sql for JSON, array, and JSON array fields and will correctly handle all special characters and escape all apostrophes

Also added tests to ensure these edge cases are properly accounted for.

QuinnStraus avatar Jan 08 '25 17:01 QuinnStraus

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
studio-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 11, 2025 3:44pm
5 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs ⬜️ Ignored (Inspect) Visit Preview Jun 11, 2025 3:44pm
studio ⬜️ Ignored (Inspect) Visit Preview Jun 11, 2025 3:44pm
studio-self-hosted ⬜️ Ignored (Inspect) Visit Preview Jun 11, 2025 3:44pm
zone-www-dot-com ⬜️ Ignored (Inspect) Visit Preview Jun 11, 2025 3:44pm
design-system ⬜️ Skipped (Inspect) Jun 11, 2025 3:44pm

vercel[bot] avatar Jan 08 '25 17:01 vercel[bot]

@QuinnStraus is attempting to deploy a commit to the Supabase Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Jan 08 '25 17:01 vercel[bot]

Thanks for contributing to Supabase! ❤️ Our team will review your PR.

A few tips for a smoother review process:

  • If you have a local version of the repo, run pnpm run format to make sure formatting checks pass.
  • Once we've reviewed your PR, please don't trivially merge master (don't click Update branch if there are no merge conflicts to be fixed). This invalidates any pre-merge checks we've run.

github-actions[bot] avatar Jan 08 '25 17:01 github-actions[bot]

Hi @QuinnStraus - We’re doing a bit of housekeeping and plan to close out PRs that have been inactive for more than 3 months. If you’re still interested in landing this, feel free to fix any merge conflicts and reopen it. Thanks!

Hallidayo avatar Nov 07 '25 15:11 Hallidayo