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

Add option to dump schema without owner #370

Open
jayrosen1576 opened this issue Mar 25, 2019 · 1 comment
Open

Add option to dump schema without owner #370

jayrosen1576 opened this issue Mar 25, 2019 · 1 comment
Labels
proposal A suggestion for a change, feature, enhancement, etc
Milestone

Comments

@jayrosen1576
Copy link

We are using soda in an automated deployment scenario and we are running into issues with the schema that is output after a migrate up. Currently there is no way to prevent the owner of tables from being dumped to the schema.sql file, and we may have deployments where the owner varies per instance. It would be great if there was a way to extent the below function to include other postgresql pg_dump options:

func (p *postgresql) DumpSchema(w io.Writer) error {
	cmd := exec.Command("pg_dump", "-s", fmt.Sprintf("--dbname=%s", p.URL()))
	return genericDumpSchema(p.Details(), cmd, w)
}
@stanislas-m stanislas-m added the proposal A suggestion for a change, feature, enhancement, etc label Apr 13, 2019
@sio4 sio4 added this to the Backlog milestone Sep 20, 2022
@paxer
Copy link

paxer commented Nov 7, 2023

As a workaround, we've added migrations/schema.sql to .gitignore, and on CI we always force migrations to run instead of loading from the schema.sql e.g.

buffalo test --force-migrations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal A suggestion for a change, feature, enhancement, etc
Projects
None yet
Development

No branches or pull requests

4 participants