Skip to content

Conversation

@rileychh
Copy link
Contributor

@rileychh rileychh commented Oct 13, 2025

This PR fixes a MySQL error that occurred when running migrations with Docker Compose: BLOB, TEXT, GEOMETRY or JSON column 'keywords' can't have a default value.

Background:
While MySQL 8.0.13+ supports default values for JSON columns when written as expressions (e.g., DEFAULT ('["fxignore"]')), MasoniteORM's .default() method generates SQL without the required parentheses, causing the migration to fail. Moving the default value to the application layer is a cleaner, more portable solution that works across all MySQL versions.

Changes:

  • Removed .default("[\"fxignore\"]") from the JSON column definition in the migration
  • Made the keywords column nullable instead
  • Moved the default value logic to the Guild.find_or_create() method in the model layer

This ensures MySQL compatibility while maintaining the same functional behavior.

This fixes #74

@Kyrela
Copy link
Owner

Kyrela commented Nov 11, 2025

This has been fixed by using MariaDB in the docker compose instead of MySQL. MariaDB offers better performance, more features, the image is lighter, and that's what is actually used for development on this project.

@Kyrela Kyrela closed this Nov 11, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Nov 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migration error when deployed with Docker

2 participants