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

fix: Problem in the description field when using the MariaDB or MySQL. #1

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

MarceloNunesAlves
Copy link
Owner

This pull request addresses an issue where the 'description' fields, defined as str in the SQLModel model, were being created as varchar(255) columns in MariaDB and MySQL databases. This behavior was inconsistent with the expected text data type for these fields.

Changes:

  • Modified the data type of the 'description' fields in the SQLModel model to sqlalchemy.Text. This ensures that the corresponding columns in MariaDB and MySQL are created as text columns, allowing for larger text values.
  • Note: PostgreSQL is not affected by this change as it does not require a specific size for text columns.

Reasoning:

  • The varchar(255) data type imposes a character limit, which may not be sufficient for storing longer descriptions.
  • Using the text data type provides more flexibility for storing variable-length text data without size constraints.

@MarceloNunesAlves MarceloNunesAlves merged commit 7c008c8 into main Aug 19, 2024
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.

1 participant