{# Schema Watch panel — HTMX partial loaded into the Schema page.
Context: connection_id, latest (snapshot dict or None), changes (list). #}
Schema watch
{% if latest %}
{{ latest.taken_at[:16].replace('T', ' ') }} UTC
{% else %}
not watched yet
{% endif %}
{% if latest %}
{{ latest.table_count }} tables · {{ latest.column_count }} columns in the last snapshot.
Schedule it under Scheduled → Schema watch to get notified on changes.
{% else %}
Take a first snapshot; every later check reports what changed (tables, columns, types, keys, indexes)
and raises schema.changed for your notification channels.