remove old sql creation scripts and legacy upgrades
authorMichael J. Rubinsky <mrubinsk@horde.org>
Thu, 16 Sep 2010 21:30:01 +0000 (17:30 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Thu, 16 Sep 2010 21:30:01 +0000 (17:30 -0400)
16 files changed:
ansel/scripts/sql/ansel.pgsql.sql [deleted file]
ansel/scripts/sql/ansel.sql [deleted file]
ansel/scripts/upgrades/1.0_to_1.1.php [deleted file]
ansel/scripts/upgrades/2008-06-04-faces.sql [deleted file]
ansel/scripts/upgrades/2008-06-17_fix_varchar_lengths.sql [deleted file]
ansel/scripts/upgrades/2008-09-13_add_image_original_date.sql [deleted file]
ansel/scripts/upgrades/2008-09-16_add_original_date_values.php [deleted file]
ansel/scripts/upgrades/2008-09-23_fix_group_uid.sql [deleted file]
ansel/scripts/upgrades/2008-12-5_add_geolocation_tables.sql [deleted file]
ansel/scripts/upgrades/2009-01-10_fix_view_mode.sql [deleted file]
ansel/scripts/upgrades/2009-04-14_fix_view_mode.pgsql.sql [deleted file]
ansel/scripts/upgrades/2009-06-14_fix_geolocation_values.php [deleted file]
ansel/scripts/upgrades/2009-06-22_add_geolocation_fields.sql [deleted file]
ansel/scripts/upgrades/2009-06-22_move_geolocation_values.php [deleted file]
ansel/scripts/upgrades/2009-07-06_add_geolocation_timestamp.sql [deleted file]
ansel/scripts/upgrades/2010-03-24_fix_default_faces_value.sql [deleted file]

diff --git a/ansel/scripts/sql/ansel.pgsql.sql b/ansel/scripts/sql/ansel.pgsql.sql
deleted file mode 100644 (file)
index 5ce268f..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-CREATE TABLE ansel_images (
-    image_id             INT NOT NULL,
-    gallery_id           INT NOT NULL,
-    image_filename       VARCHAR(255) NOT NULL,
-    image_type           VARCHAR(100) NOT NULL,
-    image_caption        TEXT,
-    image_uploaded_date  INT NOT NULL,
-    image_sort           INT NOT NULL,
-    image_faces          INT DEFAULT 0 NOT NULL,
-    image_original_date  INT NOT NULL,
-    image_latitude VARCHAR(32),
-    image_longitude VARCHAR(32),
-    image_location VARCHAR(255),
-    image_geotag_date   INT,
---
-    PRIMARY KEY (image_id)
-);
-CREATE INDEX ansel_images_gallery_idx ON ansel_images (gallery_id);
-CREATE INDEX ansel_images_gallery_image_idx ON ansel_images (image_id, gallery_id);
-CREATE INDEX ansel_images_uploaded_idx ON ansel_images (image_uploaded_date);
-CREATE INDEX ansel_images_taken_idx ON ansel_images (image_uploaded_date);
-
-CREATE TABLE ansel_image_attributes (
-    image_id             INT NOT NULL,
-    attr_name            VARCHAR(50) NOT NULL,
-    attr_value           VARCHAR(255),
---
-    PRIMARY KEY (image_id, attr_name)
-);
-CREATE INDEX ansel_image_attributes_image_idx ON ansel_image_attributes (image_id);
-
-CREATE TABLE ansel_faces (
-    face_id              INT NOT NULL,
-    image_id             INT NOT NULL,
-    gallery_id           INT NOT NULL,
-    face_name            VARCHAR(255) NOT NULL,
-    face_x1              INT NOT NULL,
-    face_y1              INT NOT NULL,
-    face_x2              INT NOT NULL,
-    face_y2              INT NOT NULL,
-    face_signature       BYTEA,
---
-    PRIMARY KEY  (face_id)
-);
-
-CREATE TABLE ansel_faces_index (
-    face_id INT NOT NULL,
-    index_position INT NOT NULL,
-    index_part BYTEA
-);
-CREATE INDEX ansel_faces_index_face_id_idx ON ansel_faces_index (face_id);
-CREATE INDEX ansel_faces_index_index_part_idx ON ansel_faces_index (index_part);
-CREATE INDEX ansel_faces_index_index_position_idx ON ansel_faces_index (index_position);
-
-CREATE TABLE ansel_shares (
-    share_id INT NOT NULL,
-    share_owner VARCHAR(255) NOT NULL,
-    share_parents VARCHAR(255) NULL,
-    perm_creator SMALLINT NOT NULL,
-    perm_default SMALLINT NOT NULL,
-    perm_guest SMALLINT NOT NULL,
-    share_flags SMALLINT DEFAULT 0 NOT NULL,
-    attribute_name VARCHAR(255) NOT NULL,
-    attribute_desc TEXT,
-    attribute_default INT,
-    attribute_default_type VARCHAR(6),
-    attribute_default_prettythumb TEXT,
-    attribute_style VARCHAR(255),
-    attribute_category VARCHAR(255) DEFAULT '' NOT NULL,
-    attribute_last_modified INT,
-    attribute_date_created INT,
-    attribute_images INT DEFAULT 0 NOT NULL,
-    attribute_has_subgalleries INT DEFAULT 0 NOT NULL,
-    attribute_slug VARCHAR(255),
-    attribute_age INT DEFAULT 0 NOT NULL,
-    attribute_download VARCHAR(255),
-    attribute_passwd VARCHAR(255),
-    attribute_faces INT DEFAULT 0 NOT NULL,
-    attribute_view_mode VARCHAR(255) DEFAULT 'Normal' NOT NULL,
---
-    PRIMARY KEY (share_id)
-);
-CREATE INDEX ansel_shares_share_owner_idx ON ansel_shares (share_owner);
-CREATE INDEX ansel_shares_perm_creator_idx ON ansel_shares (perm_creator);
-CREATE INDEX ansel_shares_perm_default_idx ON ansel_shares (perm_default);
-CREATE INDEX ansel_shares_perm_guest_idx ON ansel_shares (perm_guest);
-CREATE INDEX ansel_shares_attribute_category_idx ON ansel_shares (attribute_category);
-CREATE INDEX ansel_shares_share_parents_idx ON ansel_shares (share_parents);
-
-CREATE TABLE ansel_shares_groups (
-    share_id INT NOT NULL,
-    group_uid VARCHAR(255) NOT NULL,
-    perm SMALLINT NOT NULL
-);
-CREATE INDEX ansel_shares_groups_share_id_idx ON ansel_shares_groups (share_id);
-CREATE INDEX ansel_shares_groups_group_uid_idx ON ansel_shares_groups (group_uid);
-CREATE INDEX ansel_shares_groups_perm_idx ON ansel_shares_groups (perm);
-
-
-CREATE TABLE ansel_shares_users (
-    share_id INT NOT NULL,
-    user_uid VARCHAR(255) NOT NULL,
-    perm SMALLINT NOT NULL
-);
-CREATE INDEX ansel_shares_users_share_id_idx ON ansel_shares_users (share_id);
-CREATE INDEX ansel_shares_users_user_uid_idx ON ansel_shares_users (user_uid);
-CREATE INDEX ansel_shares_users_perm_idx ON ansel_shares_users (perm);
-CREATE TABLE ansel_tags (
-    tag_id               INT NOT NULL,
-    tag_name             VARCHAR(255) NOT NULL,
-
-    PRIMARY KEY (tag_id)
-);
-
-CREATE TABLE ansel_galleries_tags (
-    gallery_id           INT NOT NULL,
-    tag_id               INT NOT NULL,
---
-    PRIMARY KEY (gallery_id, tag_id)
-);
-
-CREATE TABLE ansel_images_tags (
-    image_id             INT NOT NULL,
-    tag_id               INT NOT NULL,
---
-    PRIMARY KEY (image_id, tag_id)
-);
-
-CREATE TABLE ansel_images_geolocation (
-    image_id INT NOT NULL,
-    image_latitude VARCHAR(32),
-    image_longitude VARCHAR(32),
-    image_location VARCHAR(255),
---
-    PRIMARY KEY (image_id)
-);
-
-CREATE TABLE ansel_datatree_transition (
-    datatree_id          INT NOT NULL,
-    image_id             INT NOT NULL,
-    vfsname              VARCHAR(255) NOT NULL
-);
diff --git a/ansel/scripts/sql/ansel.sql b/ansel/scripts/sql/ansel.sql
deleted file mode 100644 (file)
index 2c95432..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-CREATE TABLE ansel_images (
-    image_id             INT NOT NULL,
-    gallery_id           INT NOT NULL,
-    image_filename       VARCHAR(255) NOT NULL,
-    image_type           VARCHAR(100) NOT NULL,
-    image_caption        TEXT,
-    image_uploaded_date  INT NOT NULL,
-    image_sort           INT NOT NULL,
-    image_faces          INT DEFAULT 0 NOT NULL,
-    image_original_date  INT NOT NULL,
-    image_latitude VARCHAR(32),
-    image_longitude VARCHAR(32),
-    image_location VARCHAR(255),
-    image_geotag_date   INT,
---
-    PRIMARY KEY (image_id)
-);
-CREATE INDEX ansel_images_gallery_idx ON ansel_images (gallery_id);
-CREATE INDEX ansel_images_gallery_image_idx ON ansel_images (image_id, gallery_id);
-CREATE INDEX ansel_images_uploaded_idx ON ansel_images (image_uploaded_date);
-CREATE INDEX ansel_images_taken_idx ON ansel_images (image_original_date);
-
-CREATE TABLE ansel_image_attributes (
-    image_id             INT NOT NULL,
-    attr_name            VARCHAR(50) NOT NULL,
-    attr_value           VARCHAR(255),
---
-    PRIMARY KEY (image_id, attr_name)
-);
-CREATE INDEX ansel_image_attributes_image_idx ON ansel_image_attributes (image_id);
-
-CREATE TABLE ansel_faces (
-    face_id              INT NOT NULL,
-    image_id             INT NOT NULL,
-    gallery_id           INT NOT NULL,
-    face_name            VARCHAR(255) NOT NULL,
-    face_x1              INT NOT NULL,
-    face_y1              INT NOT NULL,
-    face_x2              INT NOT NULL,
-    face_y2              INT NOT NULL,
-    face_signature       BLOB,
---
-    PRIMARY KEY  (face_id)
-);
-
-CREATE INDEX ansel_faces_index_index_image_idx ON ansel_faces (image_id);
-CREATE INDEX ansel_faces_index_index_gallery_idx ON ansel_faces (gallery_id);
-
-CREATE TABLE ansel_faces_index (
-    face_id INT NOT NULL,
-    index_position INT NOT NULL,
-    index_part BLOB
-);
-CREATE INDEX ansel_faces_index_face_id_idx ON ansel_faces_index (face_id);
-CREATE INDEX ansel_faces_index_index_part_idx ON ansel_faces_index (index_part (30));
-CREATE INDEX ansel_faces_index_index_position_idx ON ansel_faces_index (index_position);
-
-CREATE TABLE ansel_shares (
-    share_id INT NOT NULL,
-    share_owner VARCHAR(255) NOT NULL,
-    share_parents VARCHAR(255) NULL,
-    perm_creator SMALLINT NOT NULL,
-    perm_default SMALLINT NOT NULL,
-    perm_guest SMALLINT NOT NULL,
-    share_flags SMALLINT DEFAULT 0 NOT NULL,
-    attribute_name VARCHAR(255) NOT NULL,
-    attribute_desc TEXT,
-    attribute_default INT,
-    attribute_default_type VARCHAR(6),
-    attribute_default_prettythumb TEXT,
-    attribute_style TEXT,
-    attribute_category VARCHAR(255) DEFAULT '' NOT NULL,
-    attribute_last_modified INT,
-    attribute_date_created INT,
-    attribute_images INT DEFAULT 0 NOT NULL,
-    attribute_has_subgalleries INT DEFAULT 0 NOT NULL,
-    attribute_slug VARCHAR(255),
-    attribute_age INT DEFAULT 0 NOT NULL,
-    attribute_download VARCHAR(255),
-    attribute_passwd VARCHAR(255),
-    attribute_faces INT DEFAULT 0 NOT NULL,
-    attribute_view_mode VARCHAR(255) DEFAULT 'Normal' NOT NULL,
---
-    PRIMARY KEY (share_id)
-);
-CREATE INDEX ansel_shares_share_owner_idx ON ansel_shares (share_owner);
-CREATE INDEX ansel_shares_perm_creator_idx ON ansel_shares (perm_creator);
-CREATE INDEX ansel_shares_perm_default_idx ON ansel_shares (perm_default);
-CREATE INDEX ansel_shares_perm_guest_idx ON ansel_shares (perm_guest);
-CREATE INDEX ansel_shares_attribute_category_idx ON ansel_shares (attribute_category);
-CREATE INDEX ansel_shares_share_parents_idx ON ansel_shares (share_parents);
-
-CREATE TABLE ansel_shares_groups (
-    share_id INT NOT NULL,
-    group_uid INT NOT NULL,
-    perm SMALLINT NOT NULL
-);
-CREATE INDEX ansel_shares_groups_share_id_idx ON ansel_shares_groups (share_id);
-CREATE INDEX ansel_shares_groups_group_uid_idx ON ansel_shares_groups (group_uid);
-CREATE INDEX ansel_shares_groups_perm_idx ON ansel_shares_groups (perm);
-
-
-CREATE TABLE ansel_shares_users (
-    share_id INT NOT NULL,
-    user_uid VARCHAR(255) NOT NULL,
-    perm SMALLINT NOT NULL
-);
-CREATE INDEX ansel_shares_users_share_id_idx ON ansel_shares_users (share_id);
-CREATE INDEX ansel_shares_users_user_uid_idx ON ansel_shares_users (user_uid);
-CREATE INDEX ansel_shares_users_perm_idx ON ansel_shares_users (perm);
-CREATE TABLE ansel_tags (
-    tag_id               INT NOT NULL,
-    tag_name             VARCHAR(255) NOT NULL,
-
-    PRIMARY KEY (tag_id)
-);
-
-CREATE TABLE ansel_galleries_tags (
-    gallery_id           INT NOT NULL,
-    tag_id               INT NOT NULL,
---
-    PRIMARY KEY (gallery_id, tag_id)
-);
-
-CREATE TABLE ansel_images_tags (
-    image_id             INT NOT NULL,
-    tag_id               INT NOT NULL,
---
-    PRIMARY KEY (image_id, tag_id)
-);
-
-CREATE TABLE ansel_images_geolocation (
-    image_id INT NOT NULL,
-    image_latitude VARCHAR(32),
-    image_longitude VARCHAR(32),
-    image_location VARCHAR(255),
---
-    PRIMARY KEY (image_id)
-);
-
-CREATE TABLE ansel_datatree_transition (
-    datatree_id          INT NOT NULL,
-    image_id             INT NOT NULL,
-    vfsname              VARCHAR(255) NOT NULL
-);
diff --git a/ansel/scripts/upgrades/1.0_to_1.1.php b/ansel/scripts/upgrades/1.0_to_1.1.php
deleted file mode 100644 (file)
index 43b86ae..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/usr/bin/env php
-<?php
-/**
- * Correct geolocation data
- *
- * See the enclosed file COPYING for license information (GPL). If you
- * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
- *
- * @author Michael J. Rubinsky <mrubinsk@horde.org>
- */
-
-require_once dirname(__FILE__) . '/../../lib/Application.php';
-Horde_Registry::appInit('ansel', array('authentication' => 'none', 'cli' => true));
-
-// First update the tables
-$alter = array("ALTER TABLE ansel_images ADD COLUMN image_latitude VARCHAR(32) NOT NULL DEFAULT ''",
-               "ALTER TABLE ansel_images ADD COLUMN image_longitude VARCHAR(32) NOT NULL DEFAULT ''",
-               "ALTER TABLE ansel_images ADD COLUMN image_location VARCHAR(255) NOT NULL DEFAULT ''",
-               "ALTER TABLE ansel_images ADD COLUMN image_geotag_date INT NOT NULL DEFAULT 0");
-
-foreach ($alter as $sql) {
-    $cli->message(sprintf("Executing %s", $sql));
-    $ansel_db->exec($sql);
-}
-
-$sql = 'SELECT image_id, image_latitude, image_longitude FROM ansel_images_geolocation;';
-$results = $ansel_db->queryAll($sql, null, MDB2_FETCHMODE_ASSOC);
-$sql = $ansel_db->prepare('UPDATE ansel_images SET image_latitude = ?, image_longitude = ? WHERE image_id = ?');
-foreach ($results as $image) {
-    // Clean up from a bug in Exifer
-    if (strlen(trim($image['image_latitude'])) <= 1 || strlen(trim($image['image_longitude'])) <= 1) {
-        $cli->message(sprintf("Erroneous geoloction data for Image %d deleted", $image['image_id']), 'cli.message');
-        $ansel_db->query('DELETE FROM ansel_images_geolocation WHERE image_id = ' . $image['image_id']);
-    } else {
-        $image['image_latitude'] = (strpos($image['image_latitude'], 'S') !== false ? '-' : '') . $image['image_latitude'];
-        $image['image_latitude'] = str_replace(array('N', 'S'), array('', ''), $image['image_latitude']);
-        $image['image_longitude'] = (strpos($image['image_longitude'], 'W') !== false ? '-' : '') . $image['image_longitude'];
-        $image['image_longitude'] = str_replace(array('E', 'W'), array('', ''), $image['image_longitude']);
-        $cli->message(sprintf("Image %d updated. %s - %s", $image['image_id'], $image['image_latitude'], $image['image_longitude']), 'cli.message');
-        $sql->execute(array($image['image_latitude'], $image['image_longitude'], $image['image_id']));
-    }
-}
-
-$cli->message('Done.', 'cli.success');
diff --git a/ansel/scripts/upgrades/2008-06-04-faces.sql b/ansel/scripts/upgrades/2008-06-04-faces.sql
deleted file mode 100755 (executable)
index 3ba6b4b..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-CREATE TABLE ansel_faces (
-    face_id              INT NOT NULL,
-    image_id             INT NOT NULL,
-    gallery_id           INT NOT NULL,
-    face_name            VARCHAR(255) NOT NULL,
-    face_x1              INT NOT NULL,
-    face_y1              INT NOT NULL,
-    face_x2              INT NOT NULL,
-    face_y2              INT NOT NULL,
-    face_signature       BLOB,
---
-    PRIMARY KEY  (face_id)
-);
-
-CREATE TABLE ansel_faces_index (
-    face_id INT NOT NULL,
-    index_position INT NOT NULL,
-    index_part BLOB
-);
-CREATE INDEX ansel_faces_index_face_id_idx ON ansel_faces_index (face_id);
-CREATE INDEX ansel_faces_index_index_part_idx ON ansel_faces_index (index_part (30));
-CREATE INDEX ansel_faces_index_index_position_idx ON ansel_faces_index (index_position);
-
-ALTER TABLE ansel_shares ADD COLUMN attribute_faces INT NOT NULL;
-ALTER TABLE ansel_images ADD COLUMN image_faces INT NOT NULL;
\ No newline at end of file
diff --git a/ansel/scripts/upgrades/2008-06-17_fix_varchar_lengths.sql b/ansel/scripts/upgrades/2008-06-17_fix_varchar_lengths.sql
deleted file mode 100755 (executable)
index 0580aaf..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-ALTER TABLE ansel_shares CHANGE share_owner share_owner VARCHAR(255);
-ALTER TABLE ansel_shares CHANGE attribute_style attribute_style VARCHAR(255);
-ALTER TABLE ansel_shares_users CHANGE user_uid user_uid VARCHAR(255);
-ALTER TABLE ansel_faces CHANGE face_name face_name VARCHAR(255) NOT NULL;
\ No newline at end of file
diff --git a/ansel/scripts/upgrades/2008-09-13_add_image_original_date.sql b/ansel/scripts/upgrades/2008-09-13_add_image_original_date.sql
deleted file mode 100644 (file)
index 31435c2..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-ALTER TABLE ansel_images ADD COLUMN image_original_date INT NOT NULL;
-ALTER TABLE ansel_images CHANGE COLUMN image_uploaded image_uploaded_date  INT NOT NULL;
-
-CREATE INDEX ansel_images_original_idx ON ansel_images (image_original_date);
-ALTER TABLE ansel_images DROP index ansel_images_uploaded_idx;
-CREATE INDEX ansel_images_uploaded_date_idx ON ansel_images (image_uploaded_date);
-
-ALTER TABLE ansel_shares ADD COLUMN attribute_view_mode INT NOT NULL;
\ No newline at end of file
diff --git a/ansel/scripts/upgrades/2008-09-16_add_original_date_values.php b/ansel/scripts/upgrades/2008-09-16_add_original_date_values.php
deleted file mode 100755 (executable)
index 07d1259..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/usr/bin/env php
-<?php
-/**
-* Bare bones script to populate the ansel_images.image_original_date field with
-* either the exif DateTimeOriginal field, or the
-* ansel_images.image_uploaded_date value if the exif field is not present.
-*
-* See the enclosed file COPYING for license information (GPL). If you
-* did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
-*
-* @author Michael J. Rubinsky <mrubinsk@horde.org>
-*/
-
-require_once dirname(__FILE__) . '/../../lib/Application.php';
-Horde_Registry::appInit('ansel', array('authentication' => 'none', 'cli' => true));
-
-$sql = 'SELECT image_id, image_original_date, image_uploaded_date FROM ansel_images';
-$results = $ansel_db->queryAll($sql, null, MDB2_FETCHMODE_ASSOC);
-foreach ($results as $image) {
-    $sql = "SELECT attr_value FROM ansel_image_attributes WHERE attr_name='DateTimeOriginal' AND image_id = " . (int)$image['image_id'];
-    $datetime = $ansel_db->queryOne($sql);
-    if (!$datetime) {
-        $datetime = $image['image_uploaded_date'];
-    }
-    $sql = 'UPDATE ansel_images SET image_original_date = ' . (int)$datetime . ' WHERE image_id = ' . (int)$image['image_id'];
-    $result = $ansel_db->exec($sql);
-    if ($result instanceof PEAR_Error) {
-        $cli->fatal($result->getMessage());
-    }
-    $cli->message(sprintf("Image %d updated.", $image['image_id']), 'cli.message');
-}
-$cli->message('Done.', 'cli.success');
diff --git a/ansel/scripts/upgrades/2008-09-23_fix_group_uid.sql b/ansel/scripts/upgrades/2008-09-23_fix_group_uid.sql
deleted file mode 100644 (file)
index d921605..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-ALTER TABLE ansel_shares_groups CHANGE group_uid group_uid VARCHAR(255);
-
diff --git a/ansel/scripts/upgrades/2008-12-5_add_geolocation_tables.sql b/ansel/scripts/upgrades/2008-12-5_add_geolocation_tables.sql
deleted file mode 100644 (file)
index c57f8d2..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-CREATE TABLE ansel_images_geolocation (
-    image_id INT NOT NULL,
-    image_latitude varchar(32),
-    image_longitude varchar(32),
-
-    PRIMARY KEY (image_id)
-);
diff --git a/ansel/scripts/upgrades/2009-01-10_fix_view_mode.sql b/ansel/scripts/upgrades/2009-01-10_fix_view_mode.sql
deleted file mode 100644 (file)
index 6b14e0d..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-ALTER TABLE ansel_shares CHANGE attribute_view_mode attribute_view_mode VARCHAR(255) DEFAULT 'Normal' NOT NULL;
-
-UPDATE ansel_shares SET attribute_view_mode = 'Normal' WHERE attribute_view_mode = '0';
-UPDATE ansel_shares SET attribute_view_mode = 'Date' WHERE attribute_view_mode = '1';
-
diff --git a/ansel/scripts/upgrades/2009-04-14_fix_view_mode.pgsql.sql b/ansel/scripts/upgrades/2009-04-14_fix_view_mode.pgsql.sql
deleted file mode 100644 (file)
index 2c9f094..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-ALTER TABLE ansel_shares ALTER attribute_view_mode TYPE VARCHAR(255);
-ALTER TABLE ansel_shares ALTER attribute_view_mode SET DEFAULT 'Normal';
-UPDATE ansel_shares SET attribute_view_mode = 'Normal' WHERE attribute_view_mode = '0';
-UPDATE ansel_shares SET attribute_view_mode = 'Date' WHERE attribute_view_mode = '1';
-ALTER TABLE ansel_shares ALTER attribute_view_mode SET NOT NULL;
diff --git a/ansel/scripts/upgrades/2009-06-14_fix_geolocation_values.php b/ansel/scripts/upgrades/2009-06-14_fix_geolocation_values.php
deleted file mode 100755 (executable)
index 77caf72..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/env php
-<?php
-/**
- * Correct geolocation data
- *
- * See the enclosed file COPYING for license information (GPL). If you
- * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
- *
- * @author Michael J. Rubinsky <mrubinsk@horde.org>
- */
-
-require_once dirname(__FILE__) . '/../../Application.php';
-Horde_Registry::appInit('ansel', array('authentication' => 'none', 'cli' => true));
-
-$sql = 'SELECT image_id, image_latitude, image_longitude FROM ansel_images_geolocation;';
-$results = $ansel_db->queryAll($sql, null, MDB2_FETCHMODE_ASSOC);
-$sql = $ansel_db->prepare('UPDATE ansel_images_geolocation SET image_latitude = ?, image_longitude = ? WHERE image_id = ?');
-foreach ($results as $image) {
-    // Clean up from a bug in Exifer
-    if (strlen(trim($image['image_latitude']) <= 1) || strlen(trim($image['image_longitude']) <= 1)) {
-        $cli->message(sprintf("Erroneous geoloction data for Image %d deleted", $image['image_id']), 'cli.message');
-        $ansel_db->query('DELETE FROM ansel_images_geolocation WHERE image_id = ' . $image['image_id']);
-    } else {
-        $image['image_latitude'] = (strpos($image['image_latitude'], 'S') !== false ? '-' : '') . $image['image_latitude'];
-        $image['image_latitude'] = str_replace(array('N', 'S'), array('', ''), $image['image_latitude']);
-        $image['image_longitude'] = (strpos($image['image_longitude'], 'W') !== false ? '-' : '') . $image['image_longitude'];
-        $image['image_longitude'] = str_replace(array('E', 'W'), array('', ''), $image['image_longitude']);
-        $cli->message(sprintf("Image %d updated. %s - %s", $image['image_id'], $image['image_latitude'], $image['image_longitude']), 'cli.message');
-        $sql->execute(array($image['image_latitude'], $image['image_longitude'], $image['image_id']));
-    }
-}
-
-// Add the location column.
-$sql = 'ALTER TABLE ansel_images_geolocation ADD COLUMN image_location VARCHAR(255)';
-$ansel_db->exec($sql);
-$cli->message('Done.', 'cli.success');
diff --git a/ansel/scripts/upgrades/2009-06-22_add_geolocation_fields.sql b/ansel/scripts/upgrades/2009-06-22_add_geolocation_fields.sql
deleted file mode 100644 (file)
index 5ab846a..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-ALTER TABLE ansel_images ADD COLUMN image_latitude VARCHAR(32) DEFAULT '' NOT NULL;
-ALTER TABLE ansel_images ADD COLUMN image_longitude VARCHAR(32) DEFAULT '' NOT NULL;
-ALTER TABLE ansel_images ADD COLUMN image_location VARCHAR(255) DEFAULT '' NOT NULL;
diff --git a/ansel/scripts/upgrades/2009-06-22_move_geolocation_values.php b/ansel/scripts/upgrades/2009-06-22_move_geolocation_values.php
deleted file mode 100644 (file)
index 638d999..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env php
-<?php
-/**
- * Correct geolocation data
- *
- * See the enclosed file COPYING for license information (GPL). If you
- * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
- *
- * @author Michael J. Rubinsky <mrubinsk@horde.org>
- */
-
-require_once dirname(__FILE__) . '/lib/Application.php';
-Horde_Registry::appInit('ansel', array('authentication' => 'none', 'cli' => true));
-
-$sql = 'SELECT image_id, image_latitude, image_longitude FROM ansel_images_geolocation;';
-$results = $ansel_db->queryAll($sql, null, MDB2_FETCHMODE_ASSOC);
-$sql = $ansel_db->prepare('UPDATE ansel_images SET image_latitude = ?, image_longitude = ? WHERE image_id = ?');
-foreach ($results as $image) {
-    $cli->message(sprintf("Image %d updated. %s - %s", $image['image_id'], $image['image_latitude'], $image['image_longitude']), 'cli.message');
-    $sql->execute(array($image['image_latitude'], $image['image_longitude'], $image['image_id']));
-}
-
-$cli->message('Done.', 'cli.success');
diff --git a/ansel/scripts/upgrades/2009-07-06_add_geolocation_timestamp.sql b/ansel/scripts/upgrades/2009-07-06_add_geolocation_timestamp.sql
deleted file mode 100644 (file)
index ecc0034..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE ansel_images ADD COLUMN image_geotag_date INT;
diff --git a/ansel/scripts/upgrades/2010-03-24_fix_default_faces_value.sql b/ansel/scripts/upgrades/2010-03-24_fix_default_faces_value.sql
deleted file mode 100644 (file)
index 6420c38..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE ansel_images CHANGE image_faces image_faces INT DEFAULT 0 NOT NULL;