]> git.sur5r.net Git - bacula/bacula/commitdiff
Misc
authorKern Sibbald <kern@sibbald.com>
Fri, 13 Feb 2004 22:04:59 +0000 (22:04 +0000)
committerKern Sibbald <kern@sibbald.com>
Fri, 13 Feb 2004 22:04:59 +0000 (22:04 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1053 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/ReleaseNotes
bacula/kernstodo
bacula/src/stored/bcopy.c
bacula/src/stored/block.c
bacula/src/stored/bls.c
bacula/src/stored/btape.c
bacula/src/stored/dev.c
bacula/src/stored/read_record.c
bacula/updatedb/README [new file with mode: 0644]
bacula/updatedb/update_mysql_tables_6_to_7 [new file with mode: 0755]
bacula/updatedb/update_sqlite_tables_6_to_7 [new file with mode: 0755]

index dd83a03d06e8ab7644d9a573b60872b1c48e717f..db8232ac13b81ac4d1ef2ebab333c656c4b6598e 100644 (file)
@@ -100,6 +100,10 @@ Items to note:  !!!!!
   update your database with:
 
     ./update_bacula_tables
+
+  Please save your old database before dropping the tables or doing
+  an upgrade or you may regret it later.
+
 - smtp has now become bsmtp
 - console has now become bconsole.
 - console.conf is now bconsole.conf
index 18acd462497be0d8d92dcb8967827818691fda5a..b7eab57d36487768b91ecc0ad6c561c242ce341a 100644 (file)
@@ -72,6 +72,10 @@ For 1.33 Testing/Documentation:
      http://howtos.linux.com/guides/nag2/x-087-2-nfs.mountd.shtml
 
 For 1.33
+- Make two tape fill test work.
+- Check if the tape has moved before writing.  
+- Save and restore last_job across executions.
+- Implement restart of daemon.
 - Handling removable disks -- see below:
 - Multiple drive autochanger support -- see below.
 - Keep track of tape use time, and report when cleaning is necessary.
index 94b544bd388bb5ca405ea845fdb678c82408ac97..761a7d2d7f4e555083553f5c579aa228be3a8c89 100644 (file)
@@ -58,9 +58,10 @@ static void usage()
 "       -b bootstrap      specify a bootstrap file\n"
 "       -c <file>         specify configuration file\n"
 "       -d <nn>           set debug level to nn\n"
-"       -v                verbose\n"
 "       -i                specify input Volume names (separated by |)\n"
 "       -o                specify output Volume names (separated by |)\n"
+"       -p                proceed inspite of errors\n"
+"       -v                verbose\n"
 "       -w <dir>          specify working directory (default /tmp)\n"
 "       -?                print this message\n\n"));
    exit(1);
@@ -71,11 +72,12 @@ int main (int argc, char *argv[])
    int ch;
    char *iVolumeName = NULL;
    char *oVolumeName = NULL;
+   bool ignore_label_errors = false;
 
-   my_name_is(argc, argv, "bscan");
+   my_name_is(argc, argv, "bcopy");
    init_msg(NULL, NULL);
 
-   while ((ch = getopt(argc, argv, "b:c:d:mn:p:rsu:vV:w:?")) != -1) {
+   while ((ch = getopt(argc, argv, "b:c:d:i:o:pvw:?")) != -1) {
       switch (ch) {
       case 'b':
         bsr = parse_bsr(NULL, optarg);
@@ -94,10 +96,6 @@ int main (int argc, char *argv[])
            debug_level = 1; 
         break;
 
-      case 'v':
-        verbose++;
-        break;
-
       case 'i':                    /* input Volume name */
         iVolumeName = optarg;
         break;
@@ -106,6 +104,13 @@ int main (int argc, char *argv[])
         oVolumeName = optarg;
         break;
 
+      case 'p':
+        ignore_label_errors = true;
+        break;
+  
+      case 'v':
+        verbose++;
+        break;
 
       case 'w':
         wd = optarg;
@@ -135,6 +140,7 @@ int main (int argc, char *argv[])
 
    /* Setup and acquire input device for reading */
    in_jcr = setup_jcr("bcopy", argv[0], bsr, iVolumeName);
+   in_jcr->ignore_label_errors = ignore_label_errors;
    in_dev = setup_to_access_device(in_jcr, 1);  /* read device */
    if (!in_dev) { 
       exit(1);
@@ -178,7 +184,9 @@ int main (int argc, char *argv[])
 }
   
 
-
+/*
+ * read_records() calls back here for each record it gets
+ */
 static int record_cb(JCR *in_jcr, DEVICE *dev, DEV_BLOCK *block, DEV_RECORD *rec)
 {
    if (list_records) {
@@ -263,7 +271,7 @@ int dir_send_job_status(JCR *jcr) {return 1;}
 
 int dir_ask_sysop_to_mount_volume(JCR *jcr, DEVICE *dev)
 {
-   fprintf(stderr, "Mount Volume %s on device %s and press return when ready: ",
+   fprintf(stderr, "Mount Volume \"%s\" on device \"%s\" and press return when ready: ",
       in_jcr->VolumeName, dev_name(dev));
    getchar();  
    return 1;
index 58fa67ef5e65ff0a052b1d2d5a47955dbd03fa97..782e9d88623d30075a1e0208c10f191dcd2ba6fb 100644 (file)
@@ -650,8 +650,8 @@ reread:
       Dmsg1(90, "Read device got: ERR=%s\n", strerror(errno));
       clrerror_dev(dev, -1);
       block->read_len = 0;
-      Mmsg2(&dev->errmsg, _("Read error on device %s. ERR=%s.\n"), 
-        dev->dev_name, strerror(dev->dev_errno));
+      Mmsg4(&dev->errmsg, _("Read error at file:block %d:%d on device %s. ERR=%s.\n"), 
+        dev->file, dev->block_num, dev->dev_name, strerror(dev->dev_errno));
       Jmsg(jcr, M_ERROR, 0, "%s", dev->errmsg);
       if (dev->state & ST_EOF) {  /* EOF just seen? */
         dev->state |= ST_EOT;    /* yes, error => EOT */
index 1e01be67c2654440db4f499933b30e61c98f1f2a..ae24ab2b88c66b98d47e491461b315e754e3a6d3 100644 (file)
@@ -98,7 +98,7 @@ int main (int argc, char *argv[])
    memset(&ff, 0, sizeof(ff));
    init_include_exclude_files(&ff);
 
-   while ((ch = getopt(argc, argv, "b:c:d:e:i:jkLvV:?")) != -1) {
+   while ((ch = getopt(argc, argv, "b:c:d:e:i:jkLpvV:?")) != -1) {
       switch (ch) {
       case 'b':
         bsrName = optarg;
index fcece7f4c97a4b8370d67c7265d4b733c8ab358d..3a4edca298df60d122c347c15f6c8f2cfd04248d 100644 (file)
@@ -113,7 +113,7 @@ static DEV_BLOCK *this_block = NULL;
 static uint32_t last_file = 0;
 static uint32_t last_block_num = 0;
 static uint32_t BlockNumber = 0;
-static int simple = FALSE;
+static bool simple = true; 
 
 static char *VolumeName = NULL;
 static int vol_num;
@@ -1614,19 +1614,23 @@ blocks, it will stop.  Then it will begin re-reading the\n\
 two tapes.\n\n\
 This may take a long time -- hours! ...\n\n");
 
+/*
    get_cmd("Insert a blank tape then indicate if you want\n"
            "to run the simplified test (s) with one tape or\n"
            "the complete multiple tape (m) test: (s/m) ");
    if (cmd[0] == 's') {
       Pmsg0(-1, "Simple test (single tape) selected.\n");
-      simple = TRUE;
+      simple = true;
    } else if (cmd[0] == 'm') {
       Pmsg0(-1, "Complete multiple tape test selected.\n"); 
-      simple = FALSE;
+      simple = false;
    } else {
       Pmsg0(000, "Command aborted.\n");
       return;
    }
+*/
+   get_cmd("Insert a blank tape then indicate when you are ready ...\n");
+   simple = true;
 
    set_volume_name("TestVolume1", 1);
    labelcmd();
index 8be58acc9451a832c66a32b43949917715c265e3..ece63bff7e4a1591d74907bc6f5827ae88d4742b 100644 (file)
@@ -972,13 +972,14 @@ fsr_dev(DEVICE *dev, int num)
    stat = ioctl(dev->fd, MTIOCTOP, (char *)&mt_com);
    if (stat == 0) {
       dev->state &= ~ST_EOF;
+      dev->block_num += num;
    } else {
       if (dev->state & ST_EOF) {
         dev->state |= ST_EOT;
       } else {
-        dev->state |= ST_EOF;           /* assume EOF */
-        dev->file++;
-        dev->file_addr = 0;
+//      dev->state |= ST_EOF;           /* assume EOF */
+//      dev->file++;
+//      dev->file_addr = 0;
       }
       clrerror_dev(dev, MTFSR);
       Mmsg2(&dev->errmsg, _("ioctl MTFSR error on %s. ERR=%s.\n"),
index 277e5778a8e9cd8c05ba6204c00044e507b5c90b..2421ac480b96873274b1dc6c40ff31adb955be78 100644 (file)
@@ -105,11 +105,16 @@ int read_records(JCR *jcr,  DEVICE *dev,
                  dev->file, dev_name(dev), jcr->VolumeName);
            continue;
         } else if (dev_state(dev, ST_SHORT)) {
-            Jmsg(jcr, M_ERROR, 0, "%s", dev->errmsg);
+            Jmsg1(jcr, M_ERROR, 0, "%s", dev->errmsg);
            continue;
         } else {
            /* I/O error or strange end of tape */
            display_tape_error_status(jcr, dev);
+           if (jcr->ignore_label_errors) {
+              fsr_dev(dev, 1);       /* try skipping bad record */
+               Dmsg0(000, "Did fsr\n");
+              continue;              /* try to continue */
+           }
            ok = FALSE;
            break;
         }
@@ -344,19 +349,19 @@ static char *rec_state_to_str(DEV_RECORD *rec)
    static char buf[200]; 
    buf[0] = 0;
    if (rec->state & REC_NO_HEADER) {
-      strcat(buf, "Nohdr,");
+      bstrncat(buf, "Nohdr,", sizeof(buf));
    }
    if (is_partial_record(rec)) {
-      strcat(buf, "partial,");
+      bstrncat(buf, "partial,", sizeof(buf));
    }
    if (rec->state & REC_BLOCK_EMPTY) {
-      strcat(buf, "empty,");
+      bstrncat(buf, "empty,", sizeof(buf));
    }
    if (rec->state & REC_NO_MATCH) {
-      strcat(buf, "Nomatch,");
+      bstrncat(buf, "Nomatch,", sizeof(buf));
    }
    if (rec->state & REC_CONTINUATION) {
-      strcat(buf, "cont,");
+      bstrncat(buf, "cont,", sizeof(buf));
    }
    if (buf[0]) {
       buf[strlen(buf)-1] = 0;
diff --git a/bacula/updatedb/README b/bacula/updatedb/README
new file mode 100644 (file)
index 0000000..51fd358
--- /dev/null
@@ -0,0 +1,9 @@
+updatedb scripts
+13 Feb 2004
+
+These scripts may be used to update older versions of bacula
+databases. The scripts are designed using the standard install
+locations for mysql, sqlite and the bacula working directory
+as configured in the rpm builds. If you have different locations
+you will need to edit the $bindir variable and the working
+directory location before running them.
diff --git a/bacula/updatedb/update_mysql_tables_6_to_7 b/bacula/updatedb/update_mysql_tables_6_to_7
new file mode 100755 (executable)
index 0000000..9eacdb0
--- /dev/null
@@ -0,0 +1,67 @@
+#!/bin/sh
+#
+# Shell script to update MySQL tables from version 1.32 to 1.33
+#
+echo " "
+echo "This script will update a bacula database from version 6 to 7."
+echo "Depending on the size of your database,"
+echo "this script may take several minutes to run."
+echo " "
+
+# the location of the mysql program
+bindir=/usr/bin
+
+if $bindir/mysql $* -f <<END-OF-DATA
+USE bacula;
+
+ALTER TABLE Media ADD COLUMN InChanger TINYINT NOT NULL DEFAULT 0;
+ALTER TABLE Media ADD COLUMN MediaAddressing TINYINT NOT NULL DEFAULT 0;
+ALTER TABLE Media ADD COLUMN VolReadTime BIGINT UNSIGNED NOT NULL DEFAULT 0;
+ALTER TABLE Media ADD COLUMN VolWriteTime BIGINT UNSIGNED NOT NULL DEFAULT 0;
+
+ALTER TABLE Pool ADD COLUMN Enabled TINYINT DEFAULT 1;
+ALTER TABLE Pool ADD COLUMN ScratchPoolId INTEGER UNSIGNED DEFAULT 0 REFERENCES Pool;
+ALTER TABLE Pool ADD COLUMN RecyclePoolId INTEGER UNSIGNED DEFAULT 0 REFERENCES Pool;
+
+DROP TABLE BaseFiles;
+
+
+CREATE TABLE BaseFiles (
+   BaseId INTEGER UNSIGNED AUTO_INCREMENT,
+   JobId INTEGER UNSIGNED NOT NULL REFERENCES Job,
+   FileId INTEGER UNSIGNED NOT NULL REFERENCES File,
+   FileIndex INTEGER UNSIGNED,
+   PRIMARY KEY(BaseId)
+   );
+
+DROP TABLE UnsavedFiles;
+
+CREATE TABLE UnsavedFiles (
+   UnsavedId INTEGER UNSIGNED AUTO_INCREMENT,
+   JobId INTEGER UNSIGNED NOT NULL REFERENCES Job,
+   PathId INTEGER UNSIGNED NOT NULL REFERENCES Path,
+   FilenameId INTEGER UNSIGNED NOT NULL REFERENCES Filename,
+   PRIMARY KEY (UnsavedId)
+   );
+
+DROP TABLE BaseFiles;
+
+CREATE TABLE BaseFiles (
+   BaseId INTEGER UNSIGNED AUTO_INCREMENT,
+   BaseJobId INTEGER UNSIGNED NOT NULL REFERENCES Job,
+   JobId INTEGER UNSIGNED NOT NULL REFERENCES Job,
+   FileId INTEGER UNSIGNED NOT NULL REFERENCES File,
+   FileIndex INTEGER UNSIGNED,
+   PRIMARY KEY(BaseId)
+   );
+
+DELETE FROM Version;
+INSERT INTO Version (VersionId) VALUES (7);
+
+END-OF-DATA
+then
+   echo "Update of Bacula MySQL tables succeeded."
+else
+   echo "Update of Bacula MySQL tables failed."
+fi
+exit 0
diff --git a/bacula/updatedb/update_sqlite_tables_6_to_7 b/bacula/updatedb/update_sqlite_tables_6_to_7
new file mode 100755 (executable)
index 0000000..3b5edd7
--- /dev/null
@@ -0,0 +1,217 @@
+#!/bin/sh
+#
+# shell script to update SQLite from version 1.32 to 1.33
+#
+echo " "
+echo "This script will update a bacula database from version 6 to 7."
+echo "Depending on the size of your database,"
+echo "this script may take several minutes to run."
+echo " "
+
+# The location of the sqlite program
+bindir=/usr/lib/sqlite
+# The location of your bacula working directory
+cd /var/bacula
+
+$bindir/sqlite $* bacula.db <<END-OF-DATA
+
+BEGIN TRANSACTION;
+CREATE TEMPORARY TABLE Media_backup (
+   MediaId INTEGER UNSIGNED AUTOINCREMENT,
+   VolumeName VARCHAR(128) NOT NULL,
+   Slot INTEGER DEFAULT 0,
+   PoolId INTEGER UNSIGNED REFERENCES Pool NOT NULL,
+   MediaType VARCHAR(128) NOT NULL,
+   FirstWritten DATETIME DEFAULT 0,
+   LastWritten DATETIME DEFAULT 0,
+   LabelDate DATETIME DEFAULT 0,
+   VolJobs INTEGER UNSIGNED DEFAULT 0,
+   VolFiles INTEGER UNSIGNED DEFAULT 0,
+   VolBlocks INTEGER UNSIGNED DEFAULT 0,
+   VolMounts INTEGER UNSIGNED DEFAULT 0,
+   VolBytes BIGINT UNSIGNED DEFAULT 0,
+   VolErrors INTEGER UNSIGNED DEFAULT 0,
+   VolWrites INTEGER UNSIGNED DEFAULT 0,
+   VolCapacityBytes BIGINT UNSIGNED DEFAULT 0,
+   VolStatus VARCHAR(20) NOT NULL,
+   Recycle TINYINT DEFAULT 0,
+   VolRetention BIGINT UNSIGNED DEFAULT 0,
+   VolUseDuration BIGINT UNSIGNED DEFAULT 0,
+   MaxVolJobs INTEGER UNSIGNED DEFAULT 0,
+   MaxVolFiles INTEGER UNSIGNED DEFAULT 0,
+   MaxVolBytes BIGINT UNSIGNED DEFAULT 0,
+   InChanger TINYINT DEFAULT 0,
+   MediaAddressing TINYINT DEFAULT 0,
+   VolReadTime BIGINT UNSIGNED DEFAULT 0,
+   VolWriteTime BIGINT UNSIGNED DEFAULT 0,
+   PRIMARY KEY(MediaId)
+   );
+
+INSERT INTO Media_backup SELECT 
+   MediaId, VolumeName, Slot, PoolId,
+   MediaType, FirstWritten, LastWritten,
+   LabelDate, VolJobs, VolFiles, VolBlocks,
+   VolMounts, VolBytes, VolErrors, VolWrites,
+   VolCapacityBytes, VolStatus, Recycle,
+   VolRetention, VolUseDuration, MaxVolJobs,
+   MaxVolFiles, MaxVolBytes, 0, 0, 0, 0
+   FROM Media;
+
+
+DROP TABLE Media;
+
+CREATE TABLE Media (
+   MediaId INTEGER UNSIGNED AUTOINCREMENT,
+   VolumeName VARCHAR(128) NOT NULL,
+   Slot INTEGER DEFAULT 0,
+   PoolId INTEGER UNSIGNED REFERENCES Pool NOT NULL,
+   MediaType VARCHAR(128) NOT NULL,
+   FirstWritten DATETIME DEFAULT 0,
+   LastWritten DATETIME DEFAULT 0,
+   LabelDate DATETIME DEFAULT 0,
+   VolJobs INTEGER UNSIGNED DEFAULT 0,
+   VolFiles INTEGER UNSIGNED DEFAULT 0,
+   VolBlocks INTEGER UNSIGNED DEFAULT 0,
+   VolMounts INTEGER UNSIGNED DEFAULT 0,
+   VolBytes BIGINT UNSIGNED DEFAULT 0,
+   VolErrors INTEGER UNSIGNED DEFAULT 0,
+   VolWrites INTEGER UNSIGNED DEFAULT 0,
+   VolCapacityBytes BIGINT UNSIGNED DEFAULT 0,
+   VolStatus VARCHAR(20) NOT NULL,
+   Recycle TINYINT DEFAULT 0,
+   VolRetention BIGINT UNSIGNED DEFAULT 0,
+   VolUseDuration BIGINT UNSIGNED DEFAULT 0,
+   MaxVolJobs INTEGER UNSIGNED DEFAULT 0,
+   MaxVolFiles INTEGER UNSIGNED DEFAULT 0,
+   MaxVolBytes BIGINT UNSIGNED DEFAULT 0,
+   InChanger TINYINT DEFAULT 0,
+   MediaAddressing TINYINT DEFAULT 0,
+   VolReadTime BIGINT UNSIGNED DEFAULT 0,
+   VolWriteTime BIGINT UNSIGNED DEFAULT 0,
+   PRIMARY KEY(MediaId)
+   );
+
+INSERT INTO Media (
+   MediaId, VolumeName, Slot, PoolId,
+   MediaType, FirstWritten, LastWritten,
+   LabelDate, VolJobs, VolFiles, VolBlocks,
+   VolMounts, VolBytes, VolErrors, VolWrites,
+   VolCapacityBytes, VolStatus, Recycle,
+   VolRetention, VolUseDuration, MaxVolJobs,
+   MaxVolFiles, MaxVolBytes,
+   InChanger, MediaAddressing,
+   VolReadTime, VolWriteTime,
+   SELECT * FROM Media_backup;
+
+DROP TABLE Media_backup;
+
+CREATE INDEX inx8 ON Media (PoolId);
+
+CREATE TABLE Pool_backup (
+   PoolId INTEGER UNSIGNED AUTOINCREMENT,
+   Name VARCHAR(128) NOT NULL,
+   NumVols INTEGER UNSIGNED DEFAULT 0,
+   MaxVols INTEGER UNSIGNED DEFAULT 0,
+   UseOnce TINYINT DEFAULT 0,
+   UseCatalog TINYINT DEFAULT 1,
+   AcceptAnyVolume TINYINT DEFAULT 0,
+   VolRetention BIGINT UNSIGNED DEFAULT 0,
+   VolUseDuration BIGINT UNSIGNED DEFAULT 0,
+   MaxVolJobs INTEGER UNSIGNED DEFAULT 0,
+   MaxVolFiles INTEGER UNSIGNED DEFAULT 0,
+   MaxVolBytes BIGINT UNSIGNED DEFAULT 0,
+   AutoPrune TINYINT DEFAULT 0,
+   Recycle TINYINT DEFAULT 0,
+   PoolType VARCHAR(20) NOT NULL,
+   LabelFormat VARCHAR(128) NOT NULL,
+   Enabled TINYINT DEFAULT 1,
+   ScratchPoolId INTEGER UNSIGNED REFERENCES Pool DEFAULT 0,
+   RecyclePoolId INTEGER UNSIGNED REFERENCES Pool DEFAULT 0,
+   UNIQUE (Name),
+   PRIMARY KEY (PoolId)
+   );
+
+INSERT INTO Pool_backup SELECT
+   PoolId,
+   Name,
+   NumVols,
+   MaxVols,
+   UseOnce,
+   UseCatalog,
+   AcceptAnyVolume,
+   VolRetention,
+   VolUseDuration,
+   MaxVolJobs,
+   MaxVolFiles,
+   MaxVolBytes,
+   AutoPrune,
+   Recycle,
+   PoolType,
+   LabelFormat, 1, 0, 0
+   FROM Pool;
+
+DROP TABLE Pool;
+
+CREATE TABLE Pool (
+   PoolId INTEGER UNSIGNED AUTOINCREMENT,
+   Name VARCHAR(128) NOT NULL,
+   NumVols INTEGER UNSIGNED DEFAULT 0,
+   MaxVols INTEGER UNSIGNED DEFAULT 0,
+   UseOnce TINYINT DEFAULT 0,
+   UseCatalog TINYINT DEFAULT 1,
+   AcceptAnyVolume TINYINT DEFAULT 0,
+   VolRetention BIGINT UNSIGNED DEFAULT 0,
+   VolUseDuration BIGINT UNSIGNED DEFAULT 0,
+   MaxVolJobs INTEGER UNSIGNED DEFAULT 0,
+   MaxVolFiles INTEGER UNSIGNED DEFAULT 0,
+   MaxVolBytes BIGINT UNSIGNED DEFAULT 0,
+   AutoPrune TINYINT DEFAULT 0,
+   Recycle TINYINT DEFAULT 0,
+   PoolType VARCHAR(20) NOT NULL,
+   LabelFormat VARCHAR(128) NOT NULL,
+   Enabled TINYINT DEFAULT 1,
+   ScratchPoolId INTEGER UNSIGNED REFERENCES Pool DEFAULT 0,
+   RecyclePoolId INTEGER UNSIGNED REFERENCES Pool DEFAULT 0,
+   UNIQUE (Name),
+   PRIMARY KEY (PoolId)
+   );
+
+INSERT INTO Pool (
+   PoolId,
+   Name,
+   NumVols,
+   MaxVols,
+   UseOnce,
+   UseCatalog,
+   AcceptAnyVolume,
+   VolRetention,
+   VolUseDuration,
+   MaxVolJobs,
+   MaxVolFiles,
+   MaxVolBytes,
+   AutoPrune,
+   Recycle,
+   PoolType,
+   LabelFormat, Enabled, ScratchPoolId, RecyclePoolId)
+   SELECT * FROM Pool_backup;
+
+DROP TABLE Pool_backup;
+
+
+DROP TABLE BaseFiles;
+
+CREATE TABLE BaseFiles (
+   BaseId INTEGER UNSIGNED AUTOINCREMENT,
+   BaseJobId INTEGER UNSIGNED REFERENCES Job NOT NULL,
+   JobId INTEGER UNSIGNED REFERENCES Job NOT NULL,
+   FileId INTEGER UNSIGNED REFERENCES File NOT NULL,
+   FileIndex INTEGER UNSIGNED,
+   PRIMARY KEY(BaseId)
+   );
+
+COMMIT;
+
+DELETE FROM Version;
+INSERT INTO Version (VersionId) VALUES (7);
+
+END-OF-DATA