Show
Ignore:
Timestamp:
04/25/05 16:07:04 (8 years ago)
Author:
fproulx
Message:

2005-04-25 Fran�ois Proulx <francois.proulx@…>

  • More stylesheets work
Files:
1 modified

Legend:

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

    r571 r574  
    2929require_once BASEPATH.'classes/AbstractDb.php'; 
    3030require_once BASEPATH.'classes/Session.php'; 
    31 define('REQUIRED_SCHEMA_VERSION', 11); 
     31define('REQUIRED_SCHEMA_VERSION', 12); 
    3232 
    3333/** Check that the database schema is up to date.  If it isn't, offer to update it. */ 
     
    366366             
    367367        }  
     368         
     369        $new_schema_version = 12; 
     370        if($schema_version < $new_schema_version) 
     371        { 
     372            echo "<h2>Preparing SQL statements to update schema to version  $new_schema_version</h2>\n"; 
     373            $sql .= "\n\nUPDATE schema_info SET value='$new_schema_version' WHERE tag='schema_version';\n";  
     374            $sql .= "ALTER TABLE flickr_photostream DROP CONSTRAINT flickr_photostream_content_group_fkey;"; 
     375            $sql .= "ALTER TABLE flickr_photostream ADD CONSTRAINT flickr_photostream_content_fkey FOREIGN KEY (flickr_photostream_id) REFERENCES content (content_id) ON UPDATE CASCADE ON DELETE CASCADE;"; 
     376        } 
     377         
    368378                $db->ExecSqlUpdate("BEGIN;\n$sql\nCOMMIT;\n", true); 
    369379                echo "</html></head>";