update_020101.php 722 B

1234567891011121314151617181920212223
  1. <?php
  2. ###
  3. # @name Update to version 2.1.1
  4. # @author Tobias Reich
  5. # @copyright 2014 by Tobias Reich
  6. ###
  7. $query = Database::prepare($database, "ALTER TABLE `?` CHANGE `value` `value` VARCHAR( 200 ) NULL DEFAULT ''", [LYCHEE_TABLE_SETTINGS]);
  8. $result = $database->query($query);
  9. if (!$result) {
  10. Log::error($database, 'update_020101', __LINE__, 'Could not update database (' . $database->error . ')');
  11. return false;
  12. }
  13. $query = Database::prepare($database, "UPDATE ? SET value = '020101' WHERE `key` = 'version'", [LYCHEE_TABLE_SETTINGS]);
  14. $result = $database->query($query);
  15. if (!$result) {
  16. Log::error($database, 'update_020101', __LINE__, 'Could not update database (' . $database->error . ')');
  17. return false;
  18. }
  19. ?>