Commit 56beed8d authored by Francesc Guasch's avatar Francesc Guasch
Browse files

[#235] create tables for sqlite too

parent 2f186288
......@@ -266,12 +266,16 @@ sub _insert_data {
sub _create_tables {
my $self = shift;
return if $CONNECTOR->dbh->{Driver}{Name} !~ /mysql/i;
# return if $CONNECTOR->dbh->{Driver}{Name} !~ /mysql/i;
my $driver = lc($CONNECTOR->dbh->{Driver}{Name});
$DIR_SQL =~ s{(.*)/.*}{$1/$driver};
opendir my $ls,$DIR_SQL or die "$! $DIR_SQL";
while (my $file = readdir $ls) {
my ($table) = $file =~ m{(.*)\.sql$};
next if !$table;
next if $table =~ /^insert/;
$self->_insert_data($table) if $self->_create_table($table);
}
closedir $ls;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment