aboutsummaryrefslogtreecommitdiff
path: root/sql/map-database.sh
diff options
context:
space:
mode:
authorMuriithi Frederick Muriuki2021-07-22 14:03:28 +0300
committerMuriithi Frederick Muriuki2021-07-22 14:03:28 +0300
commit598d17fd415e905ede6ad4457a3283dcf2ef350a (patch)
treef450ac2be6cce51496762e08fe5710ae0c791039 /sql/map-database.sh
parent0263a7c79e3131d42006a38ac2fbb80556506491 (diff)
parent086b7151295ede3aed32f29fb537bb5c6172393d (diff)
downloadgenenetwork3-598d17fd415e905ede6ad4457a3283dcf2ef350a.tar.gz
Merge branch 'main' of github.com:genenetwork/genenetwork3
Diffstat (limited to 'sql/map-database.sh')
-rwxr-xr-xsql/map-database.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/sql/map-database.sh b/sql/map-database.sh
new file mode 100755
index 0000000..2e4d1d7
--- /dev/null
+++ b/sql/map-database.sh
@@ -0,0 +1,15 @@
+#! /bin/sh -e
+
+# This scripts visualizes schema.sql into schema.png and schema.svg. It uses
+# sqlt-graph from the perl-sql-transform package. Sadly, perl-sql-transform is
+# not packaged for Guix yet. We will likely deprecate this script in favor of
+# a custom scheme script that does not depend on perl-sql-transform.
+
+skip_tables=AvgMethod,CeleraINFO_mm6,Chr_Length,DatasetMapInvestigator,DatasetStatus,Dataset_mbat,EnsemblProbe,EnsemblProbeLocation,GORef,GeneCategory,GeneIDXRef,GeneList_rn3,GeneList_rn33,GeneMap_cuiyan,GeneRIFXRef,GenoCode,GenoFile,GenoSE,H2,InfoFiles,InfoFilesUser_md5,LCorrRamin3,RatSnpPattern,Sample,SampleXRef,SnpAllRat,SnpAllele_to_be_deleted,SnpPattern,SnpSource,Vlookup,metadata_audit,pubmedsearch,temporary
+
+clusters="Others=AccessLog,Docs,Investigators,MachineAccessLog,News,Organizations,TableComments,TableFieldAnnotation,User,UserPrivilege,login,role,roles_users,user,user_collection,user_openids"
+
+flags="--db MySQL --skip-tables $skip_tables --cluster $clusters"
+
+sqlt-graph $flags --output-type png --output schema.png schema.sql
+sqlt-graph $flags --output-type svg --output schema.svg schema.sql