summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-07-26 01:01:56 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-07-26 01:01:56 -0700
commit20b3a58bf8dcd0e63ec6cfb8f13ebfb83d83c927 (patch)
tree80a7cf5323407c12a16f497ec64997449a274ffb
parente564602a656abedd3c5f15ee4b4495d29ef96e04 (diff)
downloadfatcat-20b3a58bf8dcd0e63ec6cfb8f13ebfb83d83c927.tar.gz
fatcat-20b3a58bf8dcd0e63ec6cfb8f13ebfb83d83c927.zip
commit WIP quick dump SQL file
-rw-r--r--extra/quick_dump.sql12
1 files changed, 12 insertions, 0 deletions
diff --git a/extra/quick_dump.sql b/extra/quick_dump.sql
new file mode 100644
index 00000000..d3f52c0d
--- /dev/null
+++ b/extra/quick_dump.sql
@@ -0,0 +1,12 @@
+
+BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE READ ONLY DEFERRABLE;
+
+COPY (SELECT id, rev_id FROM creator_ident WHERE is_live=true AND redirect_id IS NULL) TO '/tmp/fatcat_ident_creators.tsv';
+COPY (SELECT id, rev_id FROM container_ident WHERE is_live=true AND redirect_id IS NULL) TO '/tmp/fatcat_ident_containers.tsv';
+COPY (SELECT id, rev_id FROM file_ident WHERE is_live=true AND redirect_id IS NULL) TO '/tmp/fatcat_ident_files.tsv';
+COPY (SELECT id, rev_id FROM release_ident WHERE is_live=true AND redirect_id IS NULL) TO '/tmp/fatcat_ident_releases.tsv';
+COPY (SELECT id, rev_id FROM work_ident WHERE is_live=true AND redirect_id IS NULL) TO '/tmp/fatcat_ident_works.tsv';
+
+COPY (SELECT row_to_json(abstracts) FROM abstracts) TO '/tmp/fatcat_abstracts.json';
+
+ROLLBACK;