Fixed data too long for column make (#137)

This commit is contained in:
Tobias Reich 2014-04-25 16:41:35 +02:00
parent 8e711cde87
commit b307e8b7ca
2 changed files with 5 additions and 1 deletions

View File

@ -15,7 +15,7 @@ CREATE TABLE IF NOT EXISTS `lychee_photos` (
`size` varchar(20) NOT NULL, `size` varchar(20) NOT NULL,
`iso` varchar(15) NOT NULL, `iso` varchar(15) NOT NULL,
`aperture` varchar(20) NOT NULL, `aperture` varchar(20) NOT NULL,
`make` varchar(20) NOT NULL, `make` varchar(50) NOT NULL,
`model` varchar(50) NOT NULL, `model` varchar(50) NOT NULL,
`shutter` varchar(30) NOT NULL, `shutter` varchar(30) NOT NULL,
`focal` varchar(20) NOT NULL, `focal` varchar(20) NOT NULL,

View File

@ -79,6 +79,10 @@ if (!$result) return false;
$result = $database->query("ALTER TABLE `lychee_albums` CHANGE `password` `password` VARCHAR(100);"); $result = $database->query("ALTER TABLE `lychee_albums` CHANGE `password` `password` VARCHAR(100);");
if (!$result) return false; 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 # Set version
$result = $database->query("UPDATE lychee_settings SET value = '020500' WHERE `key` = 'version';"); $result = $database->query("UPDATE lychee_settings SET value = '020500' WHERE `key` = 'version';");
if (!$result) return false; if (!$result) return false;