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

[models] change capacity in ball column name to ability #533

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

imtherealF1
Copy link
Contributor

@imtherealF1 imtherealF1 commented Feb 5, 2025

Renaming it, avoids confusion especially with new self hosters.

Tasks:

  • Rename in every file
  • Create migration for django

@flaree
Copy link
Member

flaree commented Feb 5, 2025

Just a note, all migrations are currently on hold until we get rid of tortoise

@laggron42 laggron42 added blocked This is blocked by an issue or pull request awaiting completion and removed blocked This is blocked by an issue or pull request awaiting completion labels Feb 12, 2025
@imtherealF1 imtherealF1 marked this pull request as ready for review February 24, 2025 14:16
capacity_logic = models.JSONField(
help_text="Effect of this capacity", blank=True, default=dict
ability_description = models.CharField(
max_length=256, help_text="Description of the countryball's ability", default=None
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you adding default=None to name and description? Columns aren't nullable so this will fail

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because otherwise django wouldn't generate the migration, should i make the fields not null?

Copy link
Member

@laggron42 laggron42 Feb 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's detected when I do it. Don't use the --no-input flag when making migrations, that would explain why they aren't detected.
image

Don't change anything other than the name of the column, other attributes should be left intact.

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

Successfully merging this pull request may close these issues.

3 participants