Diff for scripts/perl/mysql/mysql-graphviz-schema.pl between version 1.2 and 1.3
| version 1.2, 2004/11/30 19:20:37 |
version 1.3, 2004/12/15 16:06:51 |
|
|
| # 2004-11-22 - created |
# 2004-11-22 - created |
| # |
# |
| |
|
| # $Platon: scripts/perl/mysql/mysql-graphviz-schema.pl,v 1.1 2004/11/22 14:36:35 rajo Exp $ |
# $Platon: scripts/perl/mysql/mysql-graphviz-schema.pl,v 1.2 2004/11/30 19:20:37 rajo Exp $ |
| |
|
| use strict; |
use strict; |
| |
|
| $| = 1; |
$| = 1; |
| |
|
| print <<EOF |
my $create_digraph = shift; |
| |
$create_digraph = defined($create_digraph) ? $create_digraph : 'yes'; |
| |
|
| |
if ($create_digraph eq 'yes') { |
| |
print <<EOF |
| |
|
| digraph "DB structure" { |
digraph "DB structure" { |
| node [ shape = record ]; // sprav vsetky boxy hranate |
node [ shape = record ]; // sprav vsetky boxy hranate |
| fontsize = 24; |
fontsize = 24; |
| |
ranksep = 2.5; |
| |
ratio = 0.7; |
| |
rankdir = global; |
| EOF |
EOF |
| ; |
; |
| |
} |
| |
|
| my $database = ''; |
my $database = ''; |
| my $table = ''; |
my $table = ''; |
| Line 78 while (my $line = <STDIN>) { |
|
| Line 86 while (my $line = <STDIN>) { |
|
| last; |
last; |
| } |
} |
| } |
} |
| print "\t\tsubgraph \"cluster_table_${database}_$table\" {\n\t\t\tfontsize = 20;\n\t\t\tstyle = bold;\n\t\t\tfontcolor = \"red\";\n\t\t\tlabel=\"$table\";\n"; |
print "\t\tsubgraph \"cluster_table_${database}_$table\" {\n\t\t\tfontsize = 20;\n\t\t\tstyle = bold;\n\t\t\tfontcolor = \"red\";\n\t\t\tlabel=\"$database.$table\";\n"; |
| #print "\t\t\t\"table_type_${database}_$table\" [ fontsize = 12 , label = \"$table_type\" ];\n"; |
#print "\t\t\t\"table_type_${database}_$table\" [ fontsize = 12 , label = \"$table_type\" ];\n"; |
| print "\t\t\t\"table_${database}_$table\" [ fontsize = 12, label=\"{" . join('\n|', @info) . "}\""; |
print "\t\t\t\"table_${database}_$table\" [ fontsize = 12, label=\"{" . join('\n|', @info) . "}\""; |
| } |
} |
| Line 90 foreach (@references) { |
|
| Line 98 foreach (@references) { |
|
| print; |
print; |
| } |
} |
| |
|
| print <<EOF |
if ($create_digraph eq 'yes') { |
| |
print <<EOF |
| } |
} |
| |
|
| EOF |
EOF |
| ; |
; |
| |
} |
| |
|
| # vim: ts=4 |
# vim: ts=4 |
| # vim600: fdm=marker fdl=0 fdc=3 |
# vim600: fdm=marker fdl=0 fdc=3 |
Platon Group <platon@platon.org> http://platon.org/
|
|