]> andersk Git - moira.git/commitdiff
support SQL style schema as well.
authormar <mar>
Tue, 11 Dec 1990 15:23:51 +0000 (15:23 +0000)
committermar <mar>
Tue, 11 Dec 1990 15:23:51 +0000 (15:23 +0000)
db/db2tbls.awk

index 7e072a0cbf2d7076b324b00c48705884ee1b8cdd..ef15c828ad054f865b55745aab0f21f8d40d0448 100644 (file)
@@ -9,7 +9,9 @@ BEGIN { print "/* This file automatically generated */";
        print "char *tables[] = {";
 }
 
-/^create/ { printf "   \"%s\",\n", $2; }
+$1=="CREATE"   { printf "      \"%s\",\n", $3; }
+$1=="create" && $2=="table"    { printf "      \"%s\",\n", $3; }
+$1=="create" && $2!="table"    { printf "      \"%s\",\n", $2; }
 
 END   { print "        0,";
        print "};"; }
This page took 0.050702 seconds and 5 git commands to generate.