Refactor locale validation and update style consistency across schemas, tests, and migrations

- Replaced `SUPPORTED_LOCALES` with `supported_locales` for naming consistency.
- Applied formatting improvements to multiline statements for better readability.
- Cleaned up redundant comments and streamlined test assertions.
This commit is contained in:
Felipe Cardoso
2025-11-17 20:04:03 +01:00
parent 68e04a911a
commit b7c1191335
5 changed files with 16 additions and 24 deletions

View File

@@ -23,10 +23,7 @@ def upgrade() -> None:
# VARCHAR(10) supports BCP 47 format (e.g., "en", "it", "en-US", "it-IT")
# Nullable: NULL means "not set yet", will use Accept-Language header fallback
# Indexed: For analytics queries and filtering by locale
op.add_column(
"users",
sa.Column("locale", sa.String(length=10), nullable=True)
)
op.add_column("users", sa.Column("locale", sa.String(length=10), nullable=True))
# Create index on locale column for performance
op.create_index(