update_030100.php 567 B

12345678910111213141516171819
  1. <?php
  2. /**
  3. * Update to version 3.1.0
  4. */
  5. use Lychee\Modules\Database;
  6. use Lychee\Modules\Response;
  7. // Change length of album id field
  8. $query = Database::prepare($connection, "ALTER TABLE `?` CHANGE `id` `id` BIGINT(14) NOT NULL", array(LYCHEE_TABLE_ALBUMS));
  9. $result = Database::execute($connection, $query, 'update_030100', __LINE__);
  10. if ($result===false) Response::error('Could not adjust the length of the album id field!');
  11. // Set version
  12. if (Database::setVersion($connection, '030100')===false) Response::error('Could not update version of database!');
  13. ?>