diff options
author | Yorhel <git@yorhel.nl> | 2019-09-17 11:45:42 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2019-09-17 11:48:38 +0200 |
commit | 158825be34b6987c18fcdf80da4d05aee5900be6 (patch) | |
tree | b30a7ef502280af87b0bb3418a3a433f7ba6c441 /util/dbdump.pl | |
parent | 3999549a305581966a353e07cae5ea7a9c191d80 (diff) |
Rename VNDBSchema to VNDB::Schema and let it figure out the root path itself
I always avoided using the VNDB::* schema for non-web related utility
modules, but thats pretty silly (especially as I'm slowly trying to move
away from the old VNDB::* web code).
Diffstat (limited to 'util/dbdump.pl')
-rwxr-xr-x | util/dbdump.pl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/util/dbdump.pl b/util/dbdump.pl index d513c989..f90cce8b 100755 --- a/util/dbdump.pl +++ b/util/dbdump.pl @@ -34,7 +34,7 @@ our $ROOT; BEGIN { ($ROOT = abs_path $0) =~ s{/util/dbdump\.pl$}{}; } use lib "$ROOT/lib"; -use VNDBSchema; +use VNDB::Schema; # Tables and columns to export. @@ -99,9 +99,9 @@ my %tables = ( ); my @tables = map +{ name => $_, %{$tables{$_}} }, sort keys %tables; -my $schema = VNDBSchema::schema("$ROOT/util/sql/schema.sql"); -my $types = VNDBSchema::types("$ROOT/util/sql/schema.sql"); -my $references = VNDBSchema::references("$ROOT/util/sql/tableattrs.sql"); +my $schema = VNDB::Schema::schema; +my $types = VNDB::Schema::types; +my $references = VNDB::Schema::references; my $db = DBI->connect('dbi:Pg:dbname=vndb', 'vndb', undef, { RaiseError => 1 }); $db->do('SET TIME ZONE +0'); |