From 77fd1f51a3c5f5a52f72ef8a299fe368228e2285 Mon Sep 17 00:00:00 2001 From: vdigital Date: Fri, 23 May 2008 21:05:41 +0000 Subject: git-svn-id: http://piwigo.org/svn/trunk@2357 68402e56-0260-453c-a942-63ccdbb3a9ee --- BSF/install/db/20-database.php | 87 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 BSF/install/db/20-database.php (limited to 'BSF/install/db/20-database.php') diff --git a/BSF/install/db/20-database.php b/BSF/install/db/20-database.php new file mode 100644 index 000000000..4561e44ec --- /dev/null +++ b/BSF/install/db/20-database.php @@ -0,0 +1,87 @@ + $row['image_id'], + 'storage_category_id' => $row['category_id'], + ) + ); +} +mass_updates( + PREFIX_TABLE.'images', + array( + 'primary' => array('id'), + 'update' => array('storage_category_id'), + ), + $datas + ); + +// +-----------------------------------------------------------------------+ +// | Delete obsolete column | +// +-----------------------------------------------------------------------+ + +$query = ' +ALTER TABLE '.PREFIX_TABLE.'image_category DROP COLUMN is_storage +;'; +pwg_query($query); + +// +-----------------------------------------------------------------------+ +// | End notification | +// +-----------------------------------------------------------------------+ + +echo +"\n" +.'Column '.PREFIX_TABLE.'image_category' +.' replaced by '.PREFIX_TABLE.'images.storage_category_id'."\n" +; +?> -- cgit v1.2.3