Skip to content

Commit

Permalink
fix(package): Found MySQL Bug.
Browse files Browse the repository at this point in the history
For some reason ``captura.models.uuid`` needed unique for more recent
MySQL images (8.2.x -> 8.4.x).
  • Loading branch information
acederberg committed Aug 19, 2024
1 parent f727ff3 commit 93c85da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
2 changes: 1 addition & 1 deletion docker/compose.base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ services:
published: 8080
tty: true
db:
image: mysql:8
environment:
MYSQL_RANDOM_ROOT_PASSWORD: 1
MYSQL_DATABASE: captura
MYSQL_USER: captura
MYSQL_PASSWORD: changeme
image: mysql:8


14 changes: 2 additions & 12 deletions src/captura/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,8 @@
#


MappedColumnUUID = Annotated[
str,
mapped_column(
String(16),
default=lambda: secrets.token_urlsafe(8),
index=True,
),
]

uuid = (
mapped_column(String(16), default=lambda: secrets.token_urlsafe(8), index=True),
)
uuid = mapped_column(String(16), default=lambda: secrets.token_urlsafe(8), index=True, unique=True)
MappedColumnUUID = Annotated[str, uuid]
MappedColumnDeleted = Annotated[bool, mapped_column(default=False)]


Expand Down

0 comments on commit 93c85da

Please sign in to comment.