sqlmodel
sqlmodel copied to clipboard
SQL databases in Python, designed for simplicity, compatibility, and robustness.
👷 Add test for redistributing sdist, refactor CI to use requirements.txt files instead of Poetry
_I'm not that good at English. So, if there's anything you don't understand, please feel free to reply._ Currently, accessing some fields asynchronously is hard. I often encounter the **MissingGreenlet**...
This PR adds a hash function to models which contain a primary key relation. We know that a primary key does indeed offer a unique identifier for the row, and...
As I presented in #881 , mariadb doesn't have a default string size, unlike mysql, which leads to an sqlalchemy compile error. From what I understood (and tried), simply using...
Please see the [test](https://github.com/tiangolo/sqlmodel/pull/886/files#diff-e7cc3c43ee179496aea2b7e52201475cc93eb57fa4b003bb034ee776e1efa05f) I added: ```python class CreatedUpdatedMixin(SQLModel): created_by_id: Optional[int] = Field(default=None, foreign_key="user.id") created_by: Optional[User] = Relationship( sa_relationship=declared_attr( lambda cls: relationship(User, foreign_keys=cls.created_by_id) ) ) class Asset(CreatedUpdatedMixin, table=True): id: Optional[int]...
Updates the requirements on [ruff](https://github.com/astral-sh/ruff) to permit the latest version. Release notes Sourced from ruff's releases. v0.3.7 Changes Preview features [flake8-bugbear] Implement loop-iterator-mutation (B909) (#9578) [pylint] Implement rule to prefer...
- Added a new section on how to use Alembic for schema migrations with SQLModel I am aware that this document is still lacking in many aspects. I plan to...
### Privileged issue - [ ] I'm @tiangolo or he asked me directly to create an issue here. ### Issue Content `Sorry for create this issue without permission, because this...