stripe / pg-schema-diff

Go library for diffing Postgres schemas and generating SQL migrations
MIT License
316 stars 23 forks source link

Create Go script that can replace preceding tabs with spaces in SQL string literals #148

Open ammiranda opened 1 month ago

ammiranda commented 1 month ago

Related to #67, this issue is a follow-up to the PR resolving #67 which will add a Go based script that can be run as needed to correct the whitespace for the string literals.

The desired feature set should include:

ammiranda commented 1 month ago

@bplunkett-stripe Feel free to update the issue as needed.

bplunkett-stripe commented 1 month ago

Looks right to me!

Don't worry about making the "dry-run" mode too complicated, i.e., printing out line numbers. Just printing out the file name is fine.

bplunkett-stripe commented 1 day ago

You still planning on picking this up @ammiranda? Checking because I might take at a pass at it soon.

ammiranda commented 1 day ago

@bplunkett-stripe I was planning on it, but I think I need a bit more direction on how to implement it. Like how to make it invocable from the command line via the Makefile and how to read the --fix flag for it. I'm guessing the flag could be read using the flags package but I'm unsure.