1
Fork 0

Commit working scripts

This commit is contained in:
Jake Howard 2023-12-21 17:37:16 +00:00
commit 0f719e1dac
Signed by: jake
GPG Key ID: 57AFB45680EDD477
2 changed files with 2 additions and 0 deletions

1
date_audit.sql Normal file
View File

@ -0,0 +1 @@
SELECT r.owner_name, r.lower_name, to_timestamp(max(b.commit_time)), to_timestamp(r.updated_unix) FROM repository AS r INNER JOIN branch b ON b.repo_id=r.id where r.is_archived=true GROUP BY r.owner_name, r.lower_name, r.updated_unix ORDER BY r.owner_name, r.lower_name;

1
gitea-dater.sql Normal file
View File

@ -0,0 +1 @@
UPDATE repository set updated_unix=sub.commit_time FROM (SELECT r.id, max(b.commit_time) as commit_time FROM repository AS r INNER JOIN branch b ON b.repo_id=r.id where r.is_archived=true GROUP BY r.id) as sub where repository.id = sub.id;