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

goose migrate fails with sql, psql loads ok #823

Open
jmls opened this issue Sep 11, 2024 · 2 comments
Open

goose migrate fails with sql, psql loads ok #823

jmls opened this issue Sep 11, 2024 · 2 comments
Labels

Comments

@jmls
Copy link

jmls commented Sep 11, 2024

I'm trying to load some existing schema and data as a migration into a new postgres db

when goose starts up, it creates the migration table but then errors with

"ERROR: trailing junk after numeric literal at or near "8c" (SQLSTATE 42601)" loading "20240911190228_development.sql"

however, if I use psql

psql < 20240911190228_development.sql

then all the data is loaded without any apparent errors

the 20240911190228_development.sql file was created with pg_dump . Is there any options / formatting that needs to be applied to pg_dump ?

@jmls
Copy link
Author

jmls commented Sep 11, 2024

if I pg_dump with --inserts --column-inserts then the migration works

@mfridman
Copy link
Collaborator

Probably worth documenting this, but these are the commands that have been fairly useful:

@mfridman mfridman added the docs label Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants