Migrating the timeline entries according to the new model names was

previously forgotten.
This commit is contained in:
Thomas Keller 2011-12-20 23:39:40 +01:00
parent 5ffe66cbfb
commit 16573daee0

View File

@ -36,6 +36,8 @@ function IDF_Migrations_21WikiPageRevisionName_up($params=null)
} }
$db->execute('ALTER TABLE '.$db->pfx.'idf_wikirevisions RENAME TO '.$db->pfx.'idf_wikipagerevs'); $db->execute('ALTER TABLE '.$db->pfx.'idf_wikirevisions RENAME TO '.$db->pfx.'idf_wikipagerevs');
$db->execute("UPDATE ".$db->pfx."idf_timeline SET model_class='IDF_Wiki_Page' WHERE model_class LIKE 'IDF_WikiPage'");
$db->execute("UPDATE ".$db->pfx."idf_timeline SET model_class='IDF_Wiki_PageRevision' WHERE model_class LIKE 'IDF_WikiRevision'");
} }
function IDF_Migrations_21WikiPageRevisionName_down($params=null) function IDF_Migrations_21WikiPageRevisionName_down($params=null)
@ -53,4 +55,6 @@ function IDF_Migrations_21WikiPageRevisionName_down($params=null)
} }
$db->execute('ALTER TABLE '.$db->pfx.'idf_wikipagerevs RENAME TO '.$db->pfx.'idf_wikirevisions'); $db->execute('ALTER TABLE '.$db->pfx.'idf_wikipagerevs RENAME TO '.$db->pfx.'idf_wikirevisions');
$db->execute("UPDATE ".$db->pfx."idf_timeline SET model_class='IDF_WikiPage' WHERE model_class LIKE 'IDF_Wiki_Page'");
$db->execute("UPDATE ".$db->pfx."idf_timeline SET model_class='IDF_WikiRevision' WHERE model_class LIKE 'IDF_Wiki_PageRevision'");
} }