From: Michael J. Rubinsky Date: Wed, 6 Oct 2010 15:29:28 +0000 (-0400) Subject: Note that these upgrades are one way, some ws fixes, reset the style table on downgrade. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=e34a51f853eb62d0113c6ceaed9ba2e6b4bf85dc;p=horde.git Note that these upgrades are one way, some ws fixes, reset the style table on downgrade. --- diff --git a/ansel/migration/3_ansel_upgrade_style.php b/ansel/migration/3_ansel_upgrade_style.php index 9f661adda..59ffbc2c7 100644 --- a/ansel/migration/3_ansel_upgrade_style.php +++ b/ansel/migration/3_ansel_upgrade_style.php @@ -18,7 +18,7 @@ class AnselUpgradeStyle extends Horde_Db_Migration_Base { $GLOBALS['registry']->pushApp('ansel'); $this->changeColumn('ansel_shares', 'attribute_style', 'text'); - + // Create: ansel_hashes $tableList = $this->tables(); if (!in_array('ansel_hashes', $tableList)) { @@ -26,7 +26,7 @@ class AnselUpgradeStyle extends Horde_Db_Migration_Base $t->column('style_hash', 'string', array('limit' => 255)); $t->end(); } - + // Make sure we have the full styles array. require ANSEL_BASE . '/config/styles.php'; @@ -72,8 +72,14 @@ class AnselUpgradeStyle extends Horde_Db_Migration_Base } } + /** + * Downgrade, though all style information will be lost and reverted to + * 'ansel_default'. + */ public function down() { + $sql = "UPDATE ansel_shares set attribute_style = 'ansel_default'"; + $this->_connection->execute($sql); $this->changeColumn('ansel_shares', 'attribute_style', 'string', array('limit' => 255)); $this->dropTable('ansel_hashes'); } diff --git a/ansel/migration/4_ansel_upgrade_tagstocontent.php b/ansel/migration/4_ansel_upgrade_tagstocontent.php index 1d6add04b..8adc658de 100644 --- a/ansel/migration/4_ansel_upgrade_tagstocontent.php +++ b/ansel/migration/4_ansel_upgrade_tagstocontent.php @@ -56,7 +56,7 @@ class AnselUpgradeTagsToContent extends Horde_Db_Migration_Base public function down() { - // TODO + // Not supported. One way upgrade. } } \ No newline at end of file