Skip to content
Snippets Groups Projects
Commit b4df4f8e authored by Laurent Gil's avatar Laurent Gil
Browse files

Avoid the lines starting by a comment character (# or --)

parent 13c281f6
No related branches found
No related tags found
No related merge requests found
......@@ -213,6 +213,7 @@ while (<SQLFILE>) {
chomp $_;
next if ($_ eq '');
next if ($_ =~ /^\s*(DROP|PARTITION)/i);
next if ($_ =~ /^\s*(#|--)/); # Escape characters
# Verifications
if ($_ =~ /^\/\*\*/) { $in_doc=1; next; } # start of a table documentation
......@@ -334,7 +335,7 @@ while (<SQLFILE>) {
if ($doc =~ /^\W*(\w+)\W+(\w+\s?\(.*\))/ ){
$col_name = $1;
$col_type = $2;
if ($doc =~ /default\s*([^,\s]+)\s*.*(,|#).*/i) { $col_def = $1; } # Default value
if ($doc =~ /default\s+([^,\s]+)\s*.*(,|#).*/i) { $col_def = $1; } # Default value
add_column_type_and_default_value($col_name,$col_type,$col_def);
}
......@@ -361,7 +362,7 @@ while (<SQLFILE>) {
$line =~ /^\s*(.+)/;
$col_type .= $1.'<br />';
}
if ($line =~ /default\s*([^,\s]+)\s*.*(,|#).*/i) { $col_def = $1; } # Default value
if ($line =~ /default\s+([^,\s]+)\s*.*(,|#).*/i) { $col_def = $1; } # Default value
}
add_column_type_and_default_value($col_name,$col_type,$col_def);
}
......
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