<#switch sql_type> <#case 0> <#list plugin.businessClasses as business_class> <#if business_class?? > -- -- Structure for table ${business_class.businessTableName} -- DROP TABLE IF EXISTS ${business_class.businessTableName}; CREATE TABLE ${business_class.businessTableName} ( ${business_class.primaryKey} int(6) NOT NULL, <#list business_class.attributes as attribute> <#if attribute.type ='int' >${attribute.attributeName?lower_case} int(11) NOT NULL default '0'<#if attribute.type ='String' ><#if attribute.maxLength > 0 >${attribute.attributeName?lower_case} varchar(${attribute.maxLength}) NOT NULL default ''<#else>${attribute.attributeName?lower_case} long varchar NULL <#if attribute.type =='Date' >${attribute.attributeName?lower_case} date NOT NULL<#if attribute.type =='boolean' >${attribute.attributeName?lower_case} SMALLINT NOT NULL, PRIMARY KEY (${business_class.primaryKey}) ); <#break> <#case 1> <#break> <#case 2> <#break> <#case 3> <#if plugin.features??> <#list plugin.features as feature > -- -- Data for table core_admin_right -- DELETE FROM core_admin_right WHERE id_right = '${feature.featureRight}'; INSERT INTO core_admin_right (id_right,name,level_right,admin_url,description,is_updatable,plugin_name,id_feature_group,icon_url,documentation_url, id_order ) VALUES ('${feature.featureRight}','${plugin.pluginName}.adminFeature.${feature.featureName}.name',1,'jsp/admin/plugins/${plugin.pluginName}/${feature.jspName}','${plugin.pluginName}.adminFeature.${feature.featureName}.description',0,'${plugin.pluginName}',NULL,NULL,NULL,4); -- -- Data for table core_user_right -- DELETE FROM core_user_right WHERE id_right = '${feature.featureRight}'; INSERT INTO core_user_right (id_right,id_user) VALUES ('${feature.featureRight}',1); <#break> <#case 4> <#list plugin.portlets as portlet> <#assign nBeginIndex = portlet.portletTypeName?last_index_of("_")><#assign portletName = portlet.portletTypeName?substring(0, nBeginIndex)?lower_case> -- -- Structure for table ${portletName?lower_case}_portlet -- DROP TABLE IF EXISTS ${portletName?lower_case}_portlet; CREATE TABLE ${portletName?lower_case}_portlet ( id_portlet int default '0' NOT NULL, ${portletName?lower_case}_feed_id varchar(100) default NULL, PRIMARY KEY (id_portlet) ); <#break> <#default>