]> andersk Git - moira.git/blobdiff - backup/db2rest.awk
Back up sids the same way we back up gdss signatures.
[moira.git] / backup / db2rest.awk
index ab9a41bd868255776c667933a0eae92b82071d11..07e637e9e17a1041f41ee5d05952132e3ffacd4d 100644 (file)
@@ -1,4 +1,4 @@
-#      $Id $
+#      $Id$
 #
 #      This converts the file used to originally create the database
 #      into a program to restore it from a backup.
@@ -50,9 +50,9 @@ NF >= 2 {
                t = split(temp[2], temp2, ")");
                if (t != 2) printf "Can't parse %s\n", temp[2];
                printf "  char\tt_%s[%d];\n", vname[count], temp2[1]+1;
-               if ($1 == "signature") {
+               if ($1 == "signature" || $1 == "sid") {
                        vtype[count]="bin";
-                       printf "  EXEC SQL VAR t_signature IS STRING(%d);\n", temp2[1]+1;
+                       printf "  EXEC SQL VAR t_%s IS STRING(%d);\n", vname[count], temp2[1]+1;
                } else vtype[count]="str";
                vsize[count] = temp2[1]+1;
        } else if ($2 ~ /DATE/) {
This page took 0.048812 seconds and 4 git commands to generate.