Remove metadata key

This commit is contained in:
Romain Neutron
2012-03-26 13:31:27 +02:00
parent 05b0e4ede5
commit b35ece6eab

View File

@@ -55,6 +55,20 @@ class patch_3604 implements patchInterface
function apply(base &$databox)
{
try
{
$sql = 'ALTER TABLE `metadatas` DROP INDEX `unique`';
$stmt = $databox->get_connection()->prepare($sql);
$stmt->execute();
$stmt->closeCursor();
}
catch(\PDOException $e)
{
}
$sql = 'SELECT m . *
FROM metadatas_structure s, metadatas m
WHERE m.meta_struct_id = s.id