update_020200.php 448 B

1234567891011121314151617
  1. <?php
  2. ###
  3. # @name Update to version 2.2
  4. # @author Tobias Reich
  5. # @copyright 2014 by Tobias Reich
  6. ###
  7. if (!$database->query("SELECT `visible` FROM `lychee_albums` LIMIT 1;")) {
  8. $result = $database->query("ALTER TABLE `lychee_albums` ADD `visible` TINYINT(1) NOT NULL DEFAULT 1");
  9. if (!$result) return false;
  10. }
  11. $result = $database->query("UPDATE lychee_settings SET value = '020200' WHERE `key` = 'version';");
  12. if (!$result) return false;
  13. ?>