-- PostgreSQL database dump
--
-\restrict TaZrdGusaZTZc5ekYVHEJsrYrMffEbVutlJGqxNWtDAodc7zBA9kzI4e9yJcOiz
+\restrict EcVPjzzaAxJjnzRDIpbc5yv5dhcWfScauYVZ8LFOgEDGgDejiH1MIE95SYJrtnU
-- Dumped from database version 17.6 (Debian 17.6-0+deb13u1)
-- Dumped by pg_dump version 17.6 (Debian 17.6-0+deb13u1)
license text NOT NULL,
list_id integer,
last_modified_at timestamp with time zone,
- etag text
+ etag text,
+ updated_at timestamp with time zone
);
-- PostgreSQL database dump complete
--
-\unrestrict TaZrdGusaZTZc5ekYVHEJsrYrMffEbVutlJGqxNWtDAodc7zBA9kzI4e9yJcOiz
+\unrestrict EcVPjzzaAxJjnzRDIpbc5yv5dhcWfScauYVZ8LFOgEDGgDejiH1MIE95SYJrtnU
for source in self.sources:
lines.append(" * %s (%s)" % (source.name, source.license))
lines.append(" %s" % source.url)
+ if source.updated_at:
+ lines.append(" Updated: %s" % source.updated_at.isoformat())
# Newline
lines.append("")
# ETag
etag : str | None
+ # Updated At
+ updated_at : datetime.datetime | None
+
# Domains
domains : "SourceDomain" = sqlmodel.Relationship(back_populates="source")
except ValueError as e:
log.warning("Failed to add '%s' to the database: %s" % (domain, e))
+ # The list has now been updated
+ self.updated_at = sqlmodel.func.current_timestamp()
+
# Mark all domains that have not been updated as removed
self.__prune()