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

Improved feedback for "migrate" when models and schema are in sync #318

Open
kyhorne opened this issue Aug 18, 2023 · 0 comments
Open

Improved feedback for "migrate" when models and schema are in sync #318

kyhorne opened this issue Aug 18, 2023 · 0 comments

Comments

@kyhorne
Copy link

kyhorne commented Aug 18, 2023

Description:

Issue:

When using Aerich to generate migrations, there might be instances where the existing database schema matches the current models perfectly, and there are no changes to be made. In such scenarios, running the migrate command in Aerich results in a less-than-helpful error message.

Steps to reproduce:

  1. Make sure the database schema is in sync with the current ORM models.
  2. Execute poetry run aerich migrate --name drop_column.

Actual Behavior:

The program throws an error:

Traceback (most recent call last):
... (rest of the traceback here)
AttributeError: 'NoneType' object has no attribute 'pop'

Suggestion:

To enhance the user experience, Aerich should provide a more intuitive feedback message when no migrations are needed. This will help users understand that their models are in sync with the database schema and no actions are required.

The following message could be a good start:

"No changes detected between the current models and the existing schema. No migrations generated."
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

1 participant