-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
error: pq: column "dirty" does not exist in line 0 #34
Comments
Looks like corruption w/ the schema migrations tracking table. My guess is that the postgres DB isn't actually empty. What's listing the tables return? Try dropping the |
@dhui That did not help, but I've got something else. I switched from postgres to sqlite, and an interesting error popped up: Indeed I wrapped my migrations in BEGIN/COMMIT. After removing that, migrate does not complain any more, at least on sqlite. Quite unfortunate that this error does not show when using postgres. |
The issue you're encountering on postgres might be due to the advisory lock being held or failing statements not being rolledback. The latter should be fixed in this repo. Reference: mattes/migrate#274 There's an open PR that fixes the advisory lock issue, but it's blocked by passing tests: #13 What's your |
Well, I'm off postgres now, and sqlite works better for my use-case, but this is the query I had to perform to get things working again on postgres:
Note I was deploying all this from a CI/CD pipeline, and my problems appeared on the test deploy which starts without databases, migrate being the only one touching the database, and the migration creating a single table. (it's for a microservice). I grepped through the source code, but could not find a case where the dirty column was not created??? I am baffled. If I have time today or tomorrow, I'll do some more digging. BTW here's my Dockerfile:
I didn't have any problem with sqlite. Can you take a good look at my build commands? |
The migrate postgres db driver creates the |
Closing due to inactivity. Please reopen if the issue persists |
I appear to have the same problem, using Postgres: cortexproject/cortex#1972 If you have any advice to troubleshoot, that would be helpful. |
Hi,
I googled this error, the original repo has something on it, but it's not clear how to fix it.
I am using the binary from this repo:
With only this migration, on an empty postgres database:
and it bombes out with the above error.
The text was updated successfully, but these errors were encountered: