[Dart] upgrade database from 1.2 missing in source code]

Tyson Henry tyson at stellarscience.com
Mon Dec 31 13:59:22 EST 2007


The upgrade from 1.2 to 1.3 was missing from your upgrade code, so I
added the "1.2 to 1.3" path.  Since you included the correct SQL file
for this, I assume its only an oversight with the missing call.

Thanks.



    /** Update the database for this project
     * For each major and minor number we know about, do the right thing.
     * Verify that the script did what it was supposed to do.
     */
    public void upgradeDatabase () throws Exception {
      // The if statements below must go in order!
      int[] version = getDBVersion ();
      int Major = version[0];
      int Minor = version[1];
      int Patch = version[2];
      logger.debug ( "upgradeDatabase found Major: " + Major + " Minor: "
+ Minor + " Patch: " + Patch );

      if ( Major == 0 && Minor == 5 ) {
        upgradeDatabase ( 0, 5, 0, 6 );
      }

      /* 0.6 to 1.0 */
      version = getDBVersion ();
      Major = version[0]; Minor = version[1]; Patch = version[2];
      if ( Major == 0 && Minor == 6 ) {
        // Get us to 1.0
        upgradeDatabase ( 0, 6, 1, 0 );
      }

      /* 1.0 to 1.1 */
      version = getDBVersion ();
      Major = version[0]; Minor = version[1]; Patch = version[2];
      if ( Major == 1 && Minor == 0 ) {
        // Get us to 1.1
        upgradeDatabase ( 1, 0, 1, 1 );
      }

      /* 1.1 to 1.2 */
      version = getDBVersion ();
      Major = version[0]; Minor = version[1]; Patch = version[2];
      if ( Major == 1 && Minor == 1 ) {
        // Get us to 1.2
        upgradeDatabase ( 1, 1, 1, 2 );
      }

      /* 1.2 to 1.3 */
      version = getDBVersion ();
      Major = version[0]; Minor = version[1]; Patch = version[2];
      if ( Major == 1 && Minor == 2 ) {
        // Get us to 1.3
        upgradeDatabase ( 1, 2, 1, 3 );
      }
    }

-- 
Tyson Henry
Stellar Science Ltd Co
"Stellar Scientific Software Solutions"
(cell)  303-718-3334
(main)  877-480-4950
(email) tyson at stellarscience.com
(web)   www.stellarscience.com

-- 
Tyson Henry
Stellar Science Ltd Co
"Stellar Scientific Software Solutions"
(cell)  303-718-3334
(main)  877-480-4950
(email) tyson at stellarscience.com
(web)   www.stellarscience.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5307 bytes
Desc: S/MIME Cryptographic Signature
Url : http://public.kitware.com/pipermail/dart/attachments/20071231/d1b7c8d5/smime.bin


More information about the Dart mailing list