diff --git a/php/database/update_020100.php b/php/database/update_020100.php deleted file mode 100644 index a9c9c9b..0000000 --- a/php/database/update_020100.php +++ /dev/null @@ -1,44 +0,0 @@ -query($query)) { - $query = Database::prepare($database, "ALTER TABLE `?` ADD `tags` VARCHAR( 1000 ) NULL DEFAULT ''", array(LYCHEE_TABLE_PHOTOS)); - $result = $database->query($query); - if (!$result) { - Log::error($database, 'update_020100', __LINE__, 'Could not update database (' . $database->error . ')'); - return false; - } -} - -$query = Database::prepare($database, "SELECT `key` FROM `?` WHERE `key` = 'dropboxKey' LIMIT 1", array(LYCHEE_TABLE_SETTINGS)); -$result = $database->query($query); -if ($result->num_rows===0) { - $query = Database::prepare($database, "INSERT INTO `?` (`key`, `value`) VALUES ('dropboxKey', '')", array(LYCHEE_TABLE_SETTINGS)); - $result = $database->query($query); - if (!$result) { - Log::error($database, 'update_020100', __LINE__, 'Could not update database (' . $database->error . ')'); - return false; - } -} - -$query = Database::prepare($database, "SELECT `key` FROM `?` WHERE `key` = 'version' LIMIT 1", array(LYCHEE_TABLE_SETTINGS)); -$result = $database->query($query); -if ($result->num_rows===0) { - $query = Database::prepare($database, "INSERT INTO `?` (`key`, `value`) VALUES ('version', '020100')", array(LYCHEE_TABLE_SETTINGS)); - $result = $database->query($query); - if (!$result) { - Log::error($database, 'update_020100', __LINE__, 'Could not update database (' . $database->error . ')'); - return false; - } -} else { - if (Database::setVersion($database, '020100')===false) return false; -} - -?> \ No newline at end of file diff --git a/php/database/update_020101.php b/php/database/update_020101.php deleted file mode 100644 index 435477e..0000000 --- a/php/database/update_020101.php +++ /dev/null @@ -1,20 +0,0 @@ -query($query); -if (!$result) { - Log::error($database, 'update_020101', __LINE__, 'Could not update database (' . $database->error . ')'); - return false; -} - -# Set version -if (Database::setVersion($database, '020101')===false) return false; - -?> \ No newline at end of file diff --git a/php/database/update_020200.php b/php/database/update_020200.php deleted file mode 100644 index 161ccc2..0000000 --- a/php/database/update_020200.php +++ /dev/null @@ -1,23 +0,0 @@ -query($query)) { - $query = Database::prepare($database, "ALTER TABLE `?` ADD `visible` TINYINT(1) NOT NULL DEFAULT 1", array(LYCHEE_TABLE_ALBUMS)); - $result = $database->query($query); - if (!$result) { - Log::error($database, 'update_020200', __LINE__, 'Could not update database (' . $database->error . ')'); - return false; - } -} - -# Set version -if (Database::setVersion($database, '020200')===false) return false; - -?> \ No newline at end of file diff --git a/php/modules/Database.php b/php/modules/Database.php index 07d4035..3b088ed 100755 --- a/php/modules/Database.php +++ b/php/modules/Database.php @@ -10,9 +10,6 @@ if (!defined('LYCHEE')) exit('Error: Direct access is not allowed!'); final class Database extends Module { private static $versions = array( - '020100', #2.1 - '020101', #2.1.1 - '020200', #2.2 '020500', #2.5 '020505', #2.5.5 '020601', #2.6.1