Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

cmd/tests.go Outdated Show resolved Hide resolved
"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.

internal/content/content.go Outdated Show resolved Hide resolved
internal/content/content.go Outdated Show resolved Hide resolved
internal/content/content.go Outdated Show resolved Hide resolved
internal/content/content.go Outdated Show resolved Hide resolved
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.