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

refinery_cli: Error: error applying update, db error: ERROR: relation "refinery_schema_history" does not exist #319

Open
ababo opened this issue Mar 5, 2024 · 5 comments

Comments

@ababo
Copy link

ababo commented Mar 5, 2024

When I try to migrate my PostgreSQL database I get:

Error: `error applying update`, `db error: ERROR: relation "refinery_schema_history" does not exist`

When I inspect the database I see some changes are applied, the refinery_schema_history table is created with no records.

@ababo ababo changed the title Error: error applying update, db error: ERROR: relation "refinery_schema_history" does not exist refinery_cli: Error: error applying update, db error: ERROR: relation "refinery_schema_history" does not exist Mar 5, 2024
@jxs
Copy link
Member

jxs commented Mar 5, 2024

Hi, you need to give more context, do you have a MRE ?

@ababo
Copy link
Author

ababo commented Mar 5, 2024

I can't share the existing migration SQL files, but those are PostgreSQL migrations we used with go-migration tool that I have renamed using V{N}__{DESC}.sql naming scheme. Then I run refinery migrate -e DATABASE_URL -p ./migrations -t 6 command and it fails with the message above. The database is populated with types, tables and other objects. The refinery_schema_history table is there as well.

@jxs
Copy link
Member

jxs commented Mar 6, 2024

are you changing the schema history table name? There has recently been patched a bug for it, see #313

@ababo
Copy link
Author

ababo commented Mar 6, 2024

No, I don't change it.

@jxs
Copy link
Member

jxs commented Mar 6, 2024

Then I am sorry, I would gladly try to help further, but without a proper way to reproduce the situation there's not much I think I can do.

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

No branches or pull requests

2 participants