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

Is package really still beta? #67

Open
denisSurkov opened this issue Jul 4, 2024 · 4 comments
Open

Is package really still beta? #67

denisSurkov opened this issue Jul 4, 2024 · 4 comments

Comments

@denisSurkov
Copy link

Hi!

Thank you for this library. I think it's cool to have 500 stars, tests, 16k download per month, and clear readme.md description.

I would like to add this library to my project. But I'm a little bit worried, why this note exists?

NOTE: this package is in beta, please check your migrations SQL before applying on production and submit issue for any question.

Is it battle tested? Can you provide some examples on why this can be still beta?

@denisSurkov
Copy link
Author

Also, may be someone know a way to avoid problems on makemigrations step?

Or there are no easy way to change behavior of how makemigrations works?

@tbicr
Copy link
Owner

tbicr commented Jul 7, 2024

Hi

NOTE: this package is in beta, please check your migrations SQL before applying on production and submit issue for any question.

This note was added when the library was released. Even though it has tests and some companies use it, it might not cover all your scenarios. So, it's important to understand how it works and how it fits your company's processes. For example, in one company where I used this library, we looked at our common migration cases to see if it worked well for us. Our main goals were to avoid long table locks using statement and lock timeouts and to save developers' time on both successful and failed migrations.

If you have issues with makemigrations, please provide details and create an issue.

@denisSurkov
Copy link
Author

@tbicr, thank you for your answer!

If you have issues with makemigrations, please provide details and create an issue.

No, I don't have any issues. I was asking if there are way to change how makemigrations work. For example, always add CreateIndexConcurrently() instead of CreateIndex(). And add atomic = False by default.

Maybe you know some workarounds?


By the way, I think it's nice to mention, that your package is used by sentry. I think this alone says a lot about package maturity.

@tbicr
Copy link
Owner

tbicr commented Aug 12, 2024

For sure it possible to change makemigrations, but I not sure is it exists any ready package that can handle all you need.

Looks like you need something similar that this lib do - it patch django migration writer and add to standard migration file comment with locally called sql using showmigrations. The biggest issue in this approach that django use introspection, so result sql can be different for local empty db, local up to date db state, production db or any other env, but if you need only add atomic = False and replace CreateIndex with CreateIndexConcurrently it definitely possible achieve similar way.

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