[horde] database cleanup ?

Andreas Schulze sca at andreasschulze.de
Wed Mar 26 22:27:11 UTC 2014


Jan Schneider:
> horde-db-migrate mnemo down
> 
> But this has to be done *before* uninstalling the application.

I tried to remove any wicked tabled from my db but get an error:

# horde-db-migrate wicked
[  INFO  ] Migrating DB up.
[  INFO  ] Current wicked schema version: 6
[  INFO  ] Ending wicked schema version: 6

# horde-db-migrate wicked down
[  INFO  ] Migrating DB down.
[  INFO  ] Current wicked schema version: 6
Migrating from WickedFixTextLength (6)
== 6 WickedFixTextLength: reverting ===========================================
== 6 WickedFixTextLength: reverted (0.0000s) ==================================

Migrating from WickedRenamePages (5)
== 5 WickedRenamePages: reverting =============================================
-- selectValue('SELECT 1 FROM wicked_pages WHERE page_name = ?', array(0 => 'AddingPages'))
   -> 0.0003s
-- beginDbTransaction()
   -> 0.0000s
-- update('UPDATE wicked_pages SET page_name = ? WHERE page_name = ?', array(0 => 'AddingPages', 1 => 'Wiki/AddingPages'))
   -> 0.0004s
   -> 1 rows
-- update('UPDATE wicked_history SET page_name = ? WHERE page_name = ?', array(0 => 'AddingPages', 1 => 'Wiki/AddingPages'))
   -> 0.0003s
   -> 0 rows
-- commitDbTransaction()
   -> 0.0032s
-- selectValue('SELECT 1 FROM wicked_pages WHERE page_name = ?', array(0 => 'HowToUseWiki'))
   -> 0.0003s
-- beginDbTransaction()
   -> 0.0000s
-- update('UPDATE wicked_pages SET page_name = ? WHERE page_name = ?', array(0 => 'HowToUseWiki', 1 => 'Wiki/Usage'))
   -> 0.0005s
   -> 1 rows
-- update('UPDATE wicked_history SET page_name = ? WHERE page_name = ?', array(0 => 'HowToUseWiki', 1 => 'Wiki/Usage'))
   -> 0.0003s
   -> 0 rows
-- commitDbTransaction()
   -> 0.0032s
-- selectValue('SELECT 1 FROM wicked_pages WHERE page_name = ?', array(0 => 'SandBox'))
   -> 0.0003s
-- beginDbTransaction()
   -> 0.0000s
-- update('UPDATE wicked_pages SET page_name = ? WHERE page_name = ?', array(0 => 'SandBox', 1 => 'Wiki/SandBox'))
   -> 0.0003s
   -> 0 rows
-- update('UPDATE wicked_history SET page_name = ? WHERE page_name = ?', array(0 => 'SandBox', 1 => 'Wiki/SandBox'))
   -> 0.0002s
   -> 0 rows
-- commitDbTransaction()
   -> 0.0000s
-- selectValue('SELECT 1 FROM wicked_pages WHERE page_name = ?', array(0 => 'WikiHome'))
   -> 0.0003s
-- selectValue('SELECT 1 FROM wicked_pages WHERE page_name = ?', array(0 => 'WikiPage'))
   -> 0.0002s
-- beginDbTransaction()
   -> 0.0000s
-- update('UPDATE wicked_pages SET page_name = ? WHERE page_name = ?', array(0 => 'WikiPage', 1 => 'Wiki/Page'))
   -> 0.0003s
   -> 0 rows
-- update('UPDATE wicked_history SET page_name = ? WHERE page_name = ?', array(0 => 'WikiPage', 1 => 'Wiki/Page'))
   -> 0.0002s
   -> 0 rows
-- commitDbTransaction()
   -> 0.0000s
-- selectValue('SELECT 1 FROM wicked_pages WHERE page_name = ?', array(0 => 'WickedTextFormat'))
   -> 0.0003s
-- beginDbTransaction()
   -> 0.0000s
-- update('UPDATE wicked_pages SET page_name = ? WHERE page_name = ?', array(0 => 'WickedTextFormat', 1 => 'Wiki/TextFormat'))
   -> 0.0006s
   -> 1 rows
-- update('UPDATE wicked_history SET page_name = ? WHERE page_name = ?', array(0 => 'WickedTextFormat', 1 => 'Wiki/TextFormat'))
   -> 0.0003s
   -> 0 rows
-- commitDbTransaction()
   -> 0.0036s
== 5 WickedRenamePages: reverted (0.0183s) ====================================

Migrating from WickedSingleRevisions (4)
== 4 WickedSingleRevisions: reverting =========================================
-- addColumn('wicked_pages', 'page_majorversion', 'integer', array('null' => false))
SQLSTATE[HY000]: General error: 1 Cannot add a NOT NULL column with default value NULL

I deleted any content from tables wicked_pages and wicked_history manualy.
But the error stay:

# horde-db-migrate wicked down
[  INFO  ] Migrating DB down.
[  INFO  ] Current wicked schema version: 4
Migrating from WickedSingleRevisions (4)
== 4 WickedSingleRevisions: reverting =========================================
-- addColumn('wicked_pages', 'page_majorversion', 'integer', array('null' => false))
SQLSTATE[HY000]: General error: 1 Cannot add a NOT NULL column with default value NULL

Andreas


More information about the horde mailing list