Project consistency and Mapped syntax for SQLAlchemy #27
Owner
- Adds BSD-2-clause licence
- Moves .alembic to alembic (no need for this to be hidden, consistency with other projects)
- Rename Base to CustomBase and move into models.py (consistency)
- Update all columns to be defined using Mapped syntax
- Update CustomBase to include overrides for datetime (use timezone) and for dict[str, Any] (gets turned into JSON type)
- Some unique constraints are removed, some of those are security issues
- Someone trying to sign up and create a new organisation can test to see if an organisation name already exists if that's unique
- There are going to be cases (e.g. GDPR requests) where we need to delete data for real, but in most cases we want to soft delete, https://guardianproject.dev/sr2/snapdirect/src/branch/main/src/models.py#L21
* Adds BSD-2-clause licence
* Moves .alembic to alembic (no need for this to be hidden, consistency with other projects)
* Rename Base to CustomBase and move into models.py (consistency)
* Update all columns to be defined using Mapped syntax
* Update CustomBase to include overrides for datetime (use timezone) and for dict[str, Any] (gets turned into JSON type)
* Some unique constraints are removed, some of those are security issues
* Someone trying to sign up and create a new organisation can test to see if an organisation name already exists if that's unique
* There are going to be cases (e.g. GDPR requests) where we need to delete data for real, but in most cases we want to soft delete, https://guardianproject.dev/sr2/snapdirect/src/branch/main/src/models.py#L21
irl
added 2 commits 2026-06-20 17:50:23 +00:00
Merge pull request 'Project consistency and Mapped syntax for SQLAlchemy' (#27) from irl/cloud-api:mapped into main
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "irl/cloud-api:mapped"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?