CC-3772: On upgrade, make sure values in cc_files year have correct format

removed to_date postgresql function, bad metadata will cause this to fail.
This commit is contained in:
Naomi Aro 2012-05-10 17:01:22 +02:00
parent e61924de37
commit 5620c2b85e
1 changed files with 1 additions and 1 deletions

View File

@ -633,7 +633,7 @@ Logging::log("getting media! - 2");
else if ($key === "year") {
$plSelect[] = "EXTRACT(YEAR FROM utime)::varchar AS ".$key;
$fileSelect[] = "EXTRACT(YEAR FROM to_date(year, 'YYYY-MM-DD'))::varchar AS ".$key;
$fileSelect[] = "year AS ".$key;
}
//need to cast certain data as ints for the union to search on.
else if (in_array($key, array("track_number", "bit_rate", "sample_rate"))){