Skip to content
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

feat: delete db dump comments by default #1049

Merged
merged 8 commits into from
May 3, 2023
Merged

feat: delete db dump comments by default #1049

merged 8 commits into from
May 3, 2023

Conversation

sweatybridge
Copy link
Contributor

@sweatybridge sweatybridge commented Apr 28, 2023

What kind of change does this PR introduce?

fixes #1047

What is the current behavior?

  • a lot of unnecessary comments generated from pg_dump
  • unclear how to increase scanner buffer size

What is the new behavior?

  • removes commented out lines from db dump by default
  • adds db dump --keep-comments flag to maintain existing behaviour
  • uses file length as the max buffer size by default
  • prints help text when input token is longer than scanner buffer size
$ supabase db reset
...
bufio.Scanner: token too long
After statement 1:      BEGIN;
Try setting SUPABASE_SCANNER_BUFFER_SIZE=5MB (default is 256KB)

Additional context

Add any other context or screenshots.

@sweatybridge sweatybridge requested a review from a team as a code owner April 28, 2023 19:04
@sweatybridge sweatybridge changed the title No comm feat: delete db dump comments by default Apr 28, 2023
@coveralls
Copy link

coveralls commented May 3, 2023

Pull Request Test Coverage Report for Build 4875173064

  • 69 of 71 (97.18%) changed or added relevant lines in 7 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.1%) to 60.645%

Changes Missing Coverage Covered Lines Changed/Added Lines %
cmd/db.go 1 2 50.0%
internal/db/remote/commit/commit.go 0 1 0.0%
Files with Coverage Reduction New Missed Lines %
internal/testing/pgtest/mock.go 1 90.96%
Totals Coverage Status
Change from base Build 4870405574: 0.1%
Covered Lines: 4327
Relevant Lines: 7135

💛 - Coveralls

@sweatybridge sweatybridge merged commit 58d4d07 into main May 3, 2023
@sweatybridge sweatybridge deleted the no-comm branch May 3, 2023 18:25
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.

Migration error:
2 participants