Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
build:
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
python-version: ["3.12", "3.13", "3.14"]
os: [ubuntu-24.04, macos-14]
runs-on: ${{ matrix.os }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dynamic = ["version"]
authors = [{ name = "Greger Stolt Nilsen", email = "gregersn@gmail.com" }]
description = "A minimalistic TTRPG package."
readme = "README.md"
requires-python = ">=3.10"
requires-python = ">=3.12"
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
Expand Down
5 changes: 5 additions & 0 deletions src/whathappened/core/auth/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
from sqlalchemy.orm import Mapped, mapped_column, relationship
from sqlalchemy.sql.schema import ForeignKey
from sqlalchemy.sql.sqltypes import Enum, String
from sqlalchemy import CheckConstraint, Column

from werkzeug.security import check_password_hash, generate_password_hash

from whathappened.core.database import Base, session
Expand Down Expand Up @@ -110,6 +112,9 @@ def __ne__(self, other):
return NotImplemented
return not equal

__table_args__ = (
CheckConstraint(f"status IN ({', '.join([f'\'{member}\'' for member in UserStatus.__members__])})", name="userstatus"),
)

class Role(Base):
"""Role a user can have."""
Expand Down
6 changes: 6 additions & 0 deletions src/whathappened/core/campaign/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from sqlalchemy.orm import Mapped, backref, mapped_column, relationship
from sqlalchemy.sql.schema import Column, ForeignKey, Table
from sqlalchemy.sql.sqltypes import DateTime, Enum, Integer, String, Text
from sqlalchemy import CheckConstraint

from whathappened.core.character.models import Character
from whathappened.core.content.mixins import BaseContent
Expand Down Expand Up @@ -177,6 +178,11 @@ def __repr__(self):

_default_fields = ["id", "title"]

__table_args__ = (
CheckConstraint(f"status IN ({', '.join([f'\'{member}\'' for member in HandoutStatus.__members__])})", name="handoutstatus"),
)



class NPC(BaseModel):
"""An NPC."""
Expand Down
Loading