Skip to content

Snippet and tests syncing #3925

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

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from
Draft

Snippet and tests syncing #3925

wants to merge 5 commits into from

Conversation

SaxonF
Copy link

@SaxonF SaxonF commented Jul 28, 2025

This adds commands for downloading and pushing "snippets" to remote (dashboard). As part of database testing work, a snippet can either by "sql" (e.g. in sql editor) or "tests". A test is an sql file that makes use of pgTap. https://supabase.com/docs/guides/database/testing

tests download downloads project snippets of type test to the tests/database folder.

snippets download downloads project snippets of type sql to the snippets folder.

Infrastructure PR https://github.com/supabase/infrastructure/pull/24519

Studio PR supabase/supabase#37499

"favorite": false,
"schema_version": schemaVersion,
"sql": sql,
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's fix the openapi type so this can be a properly generated struct.

I'd also use multipart/form upload for sql snippets to avoid string escape issues when converting sql function to json.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants