From d8c15ddf65ba90a8853504420a8d4839450ad4b0 Mon Sep 17 00:00:00 2001 From: plegall Date: Tue, 4 Apr 2006 22:29:35 +0000 Subject: feature deleted: code for categories link was too complicated for such a simple fature. Replaced by static association. Links are not persistent anymore. modification removed: #image_category.is_storage replaced by #images.storage_category_id as in branche 1.5.. git-svn-id: http://piwigo.org/svn/trunk@1121 68402e56-0260-453c-a942-63ccdbb3a9ee --- install/db/20-database.php | 91 ++++++++++++++++++++++++++++++++++++++++++++++ install/db/21-database.php | 52 ++++++++++++++++++++++++++ 2 files changed, 143 insertions(+) create mode 100644 install/db/20-database.php create mode 100644 install/db/21-database.php (limited to 'install/db') diff --git a/install/db/20-database.php b/install/db/20-database.php new file mode 100644 index 000000000..5dba69168 --- /dev/null +++ b/install/db/20-database.php @@ -0,0 +1,91 @@ + $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" +; +?> diff --git a/install/db/21-database.php b/install/db/21-database.php new file mode 100644 index 000000000..cfd08c692 --- /dev/null +++ b/install/db/21-database.php @@ -0,0 +1,52 @@ + -- cgit v1.2.3