From b307e8b7ca03b62f675362b0df7bbbfed47ce70e Mon Sep 17 00:00:00 2001 From: Tobias Reich Date: Fri, 25 Apr 2014 16:41:35 +0200 Subject: [PATCH] Fixed data too long for column make (#137) --- php/database/photos_table.sql | 2 +- php/database/update_020500.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/php/database/photos_table.sql b/php/database/photos_table.sql index 4ed4f95..ce12386 100644 --- a/php/database/photos_table.sql +++ b/php/database/photos_table.sql @@ -15,7 +15,7 @@ CREATE TABLE IF NOT EXISTS `lychee_photos` ( `size` varchar(20) NOT NULL, `iso` varchar(15) NOT NULL, `aperture` varchar(20) NOT NULL, - `make` varchar(20) NOT NULL, + `make` varchar(50) NOT NULL, `model` varchar(50) NOT NULL, `shutter` varchar(30) NOT NULL, `focal` varchar(20) NOT NULL, diff --git a/php/database/update_020500.php b/php/database/update_020500.php index 312b83a..cdfbd24 100644 --- a/php/database/update_020500.php +++ b/php/database/update_020500.php @@ -79,6 +79,10 @@ if (!$result) return false; $result = $database->query("ALTER TABLE `lychee_albums` CHANGE `password` `password` VARCHAR(100);"); if (!$result) return false; +# Set make length to 50 +$result = $database->query("ALTER TABLE `lychee_photos` CHANGE `make` `make` VARCHAR(50);"); +if (!$result) return false; + # Set version $result = $database->query("UPDATE lychee_settings SET value = '020500' WHERE `key` = 'version';"); if (!$result) return false;