Index: trunk/tools/czartool/CzarDb.pm
===================================================================
--- trunk/tools/czartool/CzarDb.pm	(revision 29038)
+++ trunk/tools/czartool/CzarDb.pm	(revision 29049)
@@ -1,3 +1,3 @@
-#!/usr/bin/perl i-w
+#!/usr/bin/perl -w
 
 package czartool::CzarDb;
@@ -6,5 +6,5 @@
 use strict;
 
-my @stages = ("chip", "cam", "fake", "warp", "stack", "diff", "magic", "magicDS", "dist"); # TODO put elsewhere
+my @stages = ("burntool", "chip", "cam", "fake", "warp", "stack", "diff", "magic", "magicDS", "dist"); # TODO put elsewhere
 
 use base 'czartool::MySQLDb';
@@ -613,7 +613,6 @@
 
     my $currentRevision = -1;
-    my $latestRevision = 10;
-
-    while ($currentRevision != $latestRevision) {
+
+    while (1) {
 
         $currentRevision = $self->getRevision();
@@ -630,4 +629,6 @@
         elsif ($currentRevision == 8) {$self->createRevision_9();}
         elsif ($currentRevision == 9) {$self->createRevision_10();}
+        elsif ($currentRevision == 10) {$self->createRevision_11();}
+        else {last;}
     }
 }
@@ -954,4 +955,34 @@
 }
 
+#######################################################################################
+# 
+# Create revision 11 of the database 
+#
+#######################################################################################
+sub createRevision_11 {
+    my ($self) = @_;
+
+    print "* Creating revision 11 of '$self->{_dbName}'\n";
+
+    # same shape as other stage tables to enable easy update
+    my $query = $self->{_db}->prepare(<<SQL);
+    CREATE TABLE burntool (
+            timestamp TIMESTAMP DEFAULT NOW(),
+            label VARCHAR(128) DEFAULT "NONE", 
+            pending BIGINT NOT NULL,
+            processed BIGINT NOT NULL,
+            faults BIGINT NOT NULL);
+SQL
+
+      $query->execute;
+        $query = $self->{_db}->prepare(<<SQL);
+        CREATE INDEX burntoolIndex ON burntool (timestamp, label);
+SQL
+
+      $query->execute;
+
+    $self->setRevision(11);
+}
+
 
 
