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

Duplicated ReplaceableEntity on every migration #85

Open
erakli opened this issue Apr 8, 2022 · 5 comments
Open

Duplicated ReplaceableEntity on every migration #85

erakli opened this issue Apr 8, 2022 · 5 comments

Comments

@erakli
Copy link

erakli commented Apr 8, 2022

All ReplaceableEntities that are defined in env.py are added on every auto generated migration. Even if there are no change in those entities.

Maybe add some sort of checksum?

Anyway, thanks for a good library!

@olirice
Copy link
Owner

olirice commented Apr 8, 2022

Could you please add the version of alembic utils you are using and a sample env.py I can use to reproduce the error?

@erakli
Copy link
Author

erakli commented Apr 8, 2022

Version is the latest:

alembic_utils==0.7.7

Example code - https://gist.github.com/erakli/be458b6bc8b122486001d167077a36c6

BUT

When I was creating this gist I found that I'm reading SQL functions from template files on every autogenerate so it could be the reason of duplicates.

@olirice
Copy link
Owner

olirice commented Apr 8, 2022

Were you having this problem on 0.7.6? or if you don't know, could you please try installing it and check?

I don't think its it should be relevant but I released it yesterday so the timing has me worried

Thanks for the gist, I'll check it out by Monday

@erakli
Copy link
Author

erakli commented Apr 8, 2022

I had the same behavior on 0.7.6. So I tried to install 0.7.7 first but it didn't help.

@olirice
Copy link
Owner

olirice commented Apr 11, 2022

PGFunction has had issues with escape characters in the past so that would be my first guess but I'd need to see the SQL files to reproduce.

If you could trim down the example to a minimum env.py file with a single in-line PGFunction that produces the behavior I'd be happy to help you debug it

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