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
17 changes: 16 additions & 1 deletion backend/app/core/migrations.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
"""Lightweight schema sync for SQLite + one-shot migration helpers.
"""Lightweight schema sync + one-shot migration helpers.

THIS MANAGES THE PRODUCTION POSTGRES SCHEMA, not just SQLite. The header
used to say "for SQLite", and every caveat below is still written in
SQLite terms, which reads as though this were self-host-only machinery.
It is not: ``app/main.py`` calls ``sync_schema(engine, Base.metadata)``
unconditionally on every boot, against whatever engine is configured —
Postgres on Fly, SQLite for a self-hosted install. There is no Alembic
in this repo, so this module plus ``create_all`` IS the schema
management for production.

Two of the SQLite caveats below read differently on Postgres: adding a
NOT NULL column without a default fails there too, but an ADD COLUMN
with a non-volatile default is metadata-only and fast (PG11+), where
SQLite rewrites. The "renames, type changes and drops need a real
migration" caveat applies equally to both.

Two kinds of function live here:

Expand Down
1 change: 0 additions & 1 deletion frontend/src/hooks/useMotionAlerts.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,5 @@ export function useMotionAlerts(cameras) {
abortRef.current?.abort()
}
// orgId: tear down + reconnect the stream under the new org's token.
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [getToken, showToast, orgId])
}
1 change: 0 additions & 1 deletion frontend/src/hooks/useNotifications.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ export function useNotifications() {
controller?.abort()
}
// orgId: tear down + reconnect the stream under the new org's token.
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [getToken, orgId])

return {
Expand Down
1 change: 0 additions & 1 deletion frontend/src/pages/AdminPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,6 @@ function AdminPage() {
if (reader) reader.cancel().catch(() => {})
}
// eslint-disable-next-line react-hooks/exhaustive-deps
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [organization?.id, hasAdminFeature])

const handleMcpFilterChange = (key, value) => {
Expand Down
Loading