</td> <td> <?php if ($database['version']) { if ($database['trunk']) { echo 'Trunk ' . $database['version'] . '+<br />' . $database['trunk']; } else { echo $database['version']; } } ?> </td> <td> <div> <?php if (version_value($latest_version) <= version_value($database['version']) && version_value($latest_version) <= version_value($cb['version'])) { ?> <img src="/images/success.gif" /> <?php echo "Version <b>{$latest_version}</b><br />already installed."; } else { ?> <div style="font-weight:bold;">Update available:</div> <input onclick="update('<?php echo $codebase_name; ?> ','stable',this)" type="button" value="Stable <?php echo $latest_version; ?> " /> <?php
$line = trim($line); preg_match('#^\\/\\* (.*) by .* \\*\\/$#', $line, $matches); $db_commit_time = $matches[1]; echo strtotime($db_commit_time) . " --- " . strtotime($database['trunk']) . "\n"; } } else { // just execute the entire delta file schema_change($sql); } } //foreach echo "Database schema is a stable release, so just apply delta.sql files of all previous\n"; echo "versions to upgrade database to last stable version.\n"; echo "Apply changelog.sql to upgrade database to bleeding edge.\n"; } else { if (version_value($database['version']) > version_value($codebase['version'])) { // database newer than codebase echo "***Database schema version is newer than codebase version***\n"; echo "This should never happen. Please upgrade your codebase to version {$database['version']}!\n"; } } // database should now be in sync with the last stable codebase // if this is a trunk codebase, apply new modifications in the changelog if ($codebase['release'] != 'stable') { if (!$database['trunk']) { echo "Database schema is the stable release of this version, but there may be new edge modifications to this version available.\n"; echo "Apply the entire changelog.sql and set release=edge in db description (if changelog is not empty).\n"; } else { echo "Database is correct version, but new edge modifications to this version may be available.\n"; echo "Now checking changelog.sql for any schema modifications that are not yet applied...\n"; }