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

Migration file names #5

Open
PetrF0X opened this issue Nov 15, 2022 · 3 comments
Open

Migration file names #5

PetrF0X opened this issue Nov 15, 2022 · 3 comments
Labels
bug Something isn't working feature request

Comments

@PetrF0X
Copy link

PetrF0X commented Nov 15, 2022

Hi @roman-right,

we've started using this project as an ODM and also for data migrations. It serves its purpose very well! I have a suggestion for you to consider.

It would be great if the name provided by the caller of bunnet new-migration command was sanitized to only contain letters, numbers, and underscores. That way the final file name (module name) would conform to https://peps.python.org/pep-0008/#package-and-module-names

We've had a case where hyphens were used as part of the migration name and it confused IntelliJ IDEA when trying to run a unit test for that module. It would be great if we were guarded against that by the library itself.

I believe this could be changed here:
https://github.com/roman-right/bunnet/blob/748cae319314b55f4683ef5b83f8d154f4cec2df/bunnet/executors/migrate.py#L166

@roman-right
Copy link
Member

Hi, thank you for the feedback.
Yup, you are right. Yes then, I'll change the format. I plan to make the format configurable, but the default one must follow the PEP

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity.

@github-actions github-actions bot added the Stale label Jan 20, 2023
@PetrF0X
Copy link
Author

PetrF0X commented Jan 25, 2023

I would like to bring this back to your attention to avoid having this issue automatically closed by github-actions bot.

@roman-right roman-right added bug Something isn't working and removed Stale labels Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feature request
Projects
None yet
Development

No branches or pull requests

2 participants