diff options
Diffstat (limited to 'extra/sql_dumps/dump_file_hashes.sql')
-rw-r--r-- | extra/sql_dumps/dump_file_hashes.sql | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/extra/sql_dumps/dump_file_hashes.sql b/extra/sql_dumps/dump_file_hashes.sql new file mode 100644 index 00000000..a84c2ee1 --- /dev/null +++ b/extra/sql_dumps/dump_file_hashes.sql @@ -0,0 +1,11 @@ + +BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE READ ONLY DEFERRABLE; + +COPY (SELECT file_ident.id, file_rev.id, file_rev.sha1, file_rev.sha256, file_rev.md5 + FROM file_rev + INNER JOIN file_ident ON file_ident.rev_id = file_rev.id + WHERE file_ident.is_live = 't' AND file_ident.redirect_id IS NULL) + TO STDOUT + WITH NULL ''; + +ROLLBACK; |