Show
Ignore:
Timestamp:
07/03/05 12:20:00 (8 years ago)
Author:
fproulx
Message:

2005-07-03 Francois Proulx <francois.proulx@…>

  • Updated the XML venues status format ( version 1.0, once approved )
  • Added long / lat fields to nodes table ( for mapping purposes )
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/wifidog-auth/wifidog/include/schema_validate.php

    r657 r659  
    2727require_once BASEPATH.'classes/AbstractDb.php'; 
    2828require_once BASEPATH.'classes/Session.php'; 
    29 define('REQUIRED_SCHEMA_VERSION', 19); 
     29define('REQUIRED_SCHEMA_VERSION', 20); 
    3030 
    3131/** Check that the database schema is up to date.  If it isn't, offer to update it. */ 
     
    464464        } 
    465465         
     466        $new_schema_version = 20; 
     467        if($schema_version < $new_schema_version) 
     468        { 
     469            echo "<h2>Preparing SQL statements to update schema to version  $new_schema_version</h2>\n"; 
     470            $sql .= "\n\nUPDATE schema_info SET value='$new_schema_version' WHERE tag='schema_version';\n";  
     471            $sql .= "ALTER TABLE nodes ADD COLUMN latitude NUMERIC(16, 6);\n"; 
     472            $sql .= "ALTER TABLE nodes ADD COLUMN longitude NUMERIC(16, 6);\n"; 
     473        } 
     474         
    466475                $db->ExecSqlUpdate("BEGIN;\n$sql\nCOMMIT;\n", true); 
    467476                echo "</html></head>";