Migrate from ionize 0.92 to 0.93 ?

... and also from 0.90 to 0.93 ...

wednesday 21 april 2010 at 15h42 • categories : Tips & Tricks

The 0.93 version of ionize introduces a lot of enhancements.
Currently, the migration from one version to another is only manual.

But the process stay easy and don't alter your data. So... Let's migrate !
(These informations are also in the /migration.txt file of the ionize package)

Database from 0.90 to 0.92

You will need to execute this script if you migrate from 0.90.

ALTER TABLE page_lang ADD `online` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '1'; ALTER TABLE page ADD `group_FK` SMALLINT( 4 ) UNSIGNED NOT NULL; ALTER TABLE article ADD `id_type` INT( 11 ) UNSIGNED NULL ; CREATE TABLE IF NOT EXISTS article_type ( id_type int(11) unsigned NOT NULL auto_increment, type varchar(50) collate utf8_unicode_ci NOT NULL, PRIMARY KEY (id_type) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1; CREATE TABLE IF NOT EXISTS extend_field ( id_extend_field INT(11) UNSIGNED NOT NULL auto_increment, name varchar(255) NOT NULL, label varchar(255) NOT NULL, type varchar(1) NOT NULL, description varchar(2000) DEFAULT '', parent varchar(50) NOT NULL, ordering int(11) default 0, translated char(1) default '0', PRIMARY KEY (id_extend_field), KEY i_extend_field_parent (parent) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1; CREATE TABLE IF NOT EXISTS extend_fields ( id_extend_fields INT(11) UNSIGNED NOT NULL auto_increment, id_extend_field INT(11) UNSIGNED NOT NULL, id_parent int(11) UNSIGNED NOT NULL, lang char(3) NOT NULL default '', content text, PRIMARY KEY (id_extend_fields), KEY i_extend_fields_lang (lang) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1;

Database from 0.92 to 0.93

ALTER TABLE extend_field ADD `value` varchar(3000) NULL; ALTER TABLE extend_field ADD `default_value` varchar(255) NULL; -- Replace subtitle1 by subtitle ALTER TABLE `article_lang` CHANGE `subtitle1` `subtitle` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL; ALTER TABLE `article_lang` CHANGE `subtitle2` `meta_title` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL; ALTER TABLE `page_lang` CHANGE `subtitle1` `subtitle` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL ; ALTER TABLE `page_lang` CHANGE `subtitle2` `meta_title` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL ;

Views modifications : New tags !

Major enhancement, like the introduction of extended tags, bring us to abandon some tags or to rewrite them differently.

This was a very hard choice, because we know the impact it can have on a website project. So we try to limit the renaming or deleting of tags.

Old tag New tag Notes
<ion:lang /> <ion:current_lang />
<ion:lang_url /> <ion:base_url lang="true" /> More logical : you ask for the base_url, including the lang or not.
<ion:subtitle1 /> <ion:subtitle /> If you need more than one subtitle, you can create an extended field and call it like this :
<ion:field name="subtitle2" from="article" />
<ion:class_active /> <ion:active_class /> More logical name
<ion:pictures /> <ion:medias type="picture" /> The new approach allows more than 4 media type.
<ion:videos /> <ion:medias type="video" />
<ion:musics /> <ion:medias type="music" />
<ion:files /> <ion:medias type="file" />