Documentation Home
This version of the framework is no longer supported. View the latest documentation.

2.0 to 2.2 Migration

Solr Configuration Changes

With the release of Broadleaf 2.2.0, we have upgraded to Solr 4.0.0 and enhanced the index building and rebuilding methods.

Note: This migration note also applies to 2.0.6 and 2.1.2, as this change was backported to those releases.

Applies to both embedded and standalone users

  1. To take advantage of the improved Lucene engine in Solr 4.0.0, you will want to update the luceneMatchVersion flag in solrconfig.xml from LUCENE_36 to LUCENE_40.

  2. Some handlers have been deprecated. In solrconfig.xml, remove the /update/javabin handler and change the /update handler to <requestHandler name="/update" class="solr.UpdateRequestHandler" />

  3. There was a line omitted from previous versions of the Broadleaf demo site schema.xml that was identified as a bug. Below the fields element, you will want to add

    <uniqueKey>id</uniqueKey>

Applies to embedded users only

  1. The location of the solrhome directory will now default to your system's temp directory if the constructor-arg in the definition of solrEmbedded is set to solrhome. If the value is set to something else, it will be treated as the path to the solrhome directory.

  2. Broadleaf now rebuilds the Solr index on a separate core and performs a core hotswap once that is done. For users of the embedded Solr, this is done automatically and requires no additional configuration.

Applies to standalone users only

Broadleaf now supports building the Solr index on a separate core and performing a core hotswap once that is done. If you do not change any configuration, this will not occur. To utilize this new functionality, you will need to update your blSearchService bean declaration to utilize the two-argument constructor as seen below:

<bean id="blSearchService" class="org.broadleafcommerce.core.search.service.solr.SolrSearchServiceImpl">
    <constructor-arg name="solrServer" ref="${solr.source}" />
    <constructor-arg name="reindexServer" <your-configuration-here> />
</bean>

If you do utilize the new hotswapping functionality, note that your solr.xml file must specify 2 cores, one named primary and one named reindex. For example, it might look like this:

<solr persistent="true" sharedLib="lib">
    <cores adminPath="/admin/cores">
        <core name="primary" instanceDir="core0dir"/>
        <core name="reindex" instanceDir="core1dir"/>
    </cores>
</solr>

Database Changes

You can find the history of changes to the database in the [[Database-Model]].

You can run the following script AT YOUR OWN RISK to update your tables.

create table BLC_ADMIN_MODULE (ADMIN_MODULE_ID bigint not null, DISPLAY_ORDER integer, ICON varchar(255), MODULE_KEY varchar(255) not null, NAME varchar(255) not null, primary key (ADMIN_MODULE_ID));
create table BLC_ADMIN_SECTION (ADMIN_SECTION_ID bigint not null, DISPLAY_CONTROLLER varchar(255), NAME varchar(255) not null, SECTION_KEY varchar(255) not null, URL varchar(255), USE_DEFAULT_HANDLER bit not null, ADMIN_MODULE_ID bigint not null, primary key (ADMIN_SECTION_ID), unique (SECTION_KEY));
create table BLC_ADMIN_SEC_PERM_XREF (ADMIN_SECTION_ID bigint not null, ADMIN_PERMISSION_ID bigint not null);
alter table BLC_CATEGORY add column FULFILLMENT_TYPE varchar(255);
alter table BLC_CATEGORY add column INVENTORY_TYPE varchar(255);
create table BLC_CURRENCY (CURRENCY_CODE varchar(255) not null, DEFAULT_FLAG bit, FRIENDLY_NAME varchar(255), primary key (CURRENCY_CODE));
create table BLC_CUSTOMER_PAYMENT (CUSTOMER_PAYMENT_ID bigint not null, PAYMENT_TOKEN varchar(255), ADDRESS_ID bigint not null, CUSTOMER_ID bigint not null, primary key (CUSTOMER_PAYMENT_ID), unique (CUSTOMER_ID, PAYMENT_TOKEN));
create table BLC_CUSTOMER_PAYMENT_FIELDS (CUSTOMER_PAYMENT_ID bigint not null, FIELD_VALUE varchar(255), FIELD_NAME varchar(255) not null, primary key (CUSTOMER_PAYMENT_ID, FIELD_NAME));
alter table BLC_FIELD add column TRANSLATABLE bit;
alter table BLC_FULFILLMENT_OPTION_FIXED add column CURRENCY_CODE varchar(255);
alter table BLC_LOCALE add column CURRENCY_CODE varchar(255);
alter table BLC_ORDER add column CURRENCY_CODE varchar(255);
alter table BLC_ORDER add column LOCALE_CODE varchar(255);
alter table BLC_PAYMENT_LOG add column CURRENCY_CODE varchar(255);
alter table BLC_PAYMENT_RESPONSE_ITEM add column CURRENCY_CODE varchar(255);
alter table BLC_SEARCH_FACET add column REQUIRES_ALL_DEPENDENT bit;
create table BLC_SEARCH_FACET_XREF (ID bigint not null, REQUIRED_FACET_ID bigint not null, SEARCH_FACET_ID bigint, primary key (ID));
alter table BLC_SKU add column FULFILLMENT_TYPE varchar(255);
alter table BLC_SKU add column INVENTORY_TYPE varchar(255);
alter table BLC_SKU_FEE add column CURRENCY_CODE varchar(255);
alter table BLC_TAX_DETAIL add column CURRENCY_CODE varchar(255);
create table BLC_UserConnection (providerId varchar(255) not null, providerUserId varchar(255) not null, userId varchar(255) not null, accessToken varchar(255) not null, displayName varchar(255), expireTime bigint, imageUrl varchar(255), profileUrl varchar(255), rank integer not null, refreshToken varchar(255), secret varchar(255), primary key (providerId, providerUserId, userId));
create index ADMINMODULE_NAME_INDEX on BLC_ADMIN_MODULE (NAME);
alter table BLC_ADMIN_SECTION add constraint FK7EA7D92FB1A18498 foreign key (ADMIN_MODULE_ID) references BLC_ADMIN_MODULE;
create index ADMINSECTION_MODULE_INDEX on BLC_ADMIN_SECTION (ADMIN_MODULE_ID);
create index ADMINSECTION_NAME_INDEX on BLC_ADMIN_SECTION (NAME);
alter table BLC_ADMIN_SEC_PERM_XREF add constraint FK5E832966E88B7D38 foreign key (ADMIN_PERMISSION_ID) references BLC_ADMIN_PERMISSION;
alter table BLC_ADMIN_SEC_PERM_XREF add constraint FK5E8329663AF7F0FC foreign key (ADMIN_SECTION_ID) references BLC_ADMIN_SECTION;
alter table BLC_CUSTOMER_PAYMENT add constraint FK8B3DF0CBC13085DD foreign key (ADDRESS_ID) references BLC_ADDRESS;
alter table BLC_CUSTOMER_PAYMENT add constraint FK8B3DF0CB7470F437 foreign key (CUSTOMER_ID) references BLC_CUSTOMER;
create index CUSTOMERPAYMENT_ADDRESS_INDEX on BLC_CUSTOMER_PAYMENT (ADDRESS_ID);
alter table BLC_CUSTOMER_PAYMENT_FIELDS add constraint FK5CCB14ADCA0B98E0 foreign key (CUSTOMER_PAYMENT_ID) references BLC_CUSTOMER_PAYMENT;
alter table BLC_FULFILLMENT_OPTION_FIXED add constraint FK408360313E2FC4F9 foreign key (CURRENCY_CODE) references BLC_CURRENCY;
alter table BLC_LOCALE add constraint FK56C7DC203E2FC4F9 foreign key (CURRENCY_CODE) references BLC_CURRENCY;
alter table BLC_ORDER add constraint FK8F5B64A8A1E1C128 foreign key (LOCALE_CODE) references BLC_LOCALE;
alter table BLC_ORDER add constraint FK8F5B64A83E2FC4F9 foreign key (CURRENCY_CODE) references BLC_CURRENCY;
alter table BLC_PAYMENT_LOG add constraint FKA43703453E2FC4F9 foreign key (CURRENCY_CODE) references BLC_CURRENCY;
alter table BLC_PAYMENT_RESPONSE_ITEM add constraint FK807B8F323E2FC4F9 foreign key (CURRENCY_CODE) references BLC_CURRENCY;
alter table BLC_SEARCH_FACET_XREF add constraint FK35A63034B96B1C93 foreign key (SEARCH_FACET_ID) references BLC_SEARCH_FACET;
alter table BLC_SEARCH_FACET_XREF add constraint FK35A63034DA7E1C7C foreign key (REQUIRED_FACET_ID) references BLC_SEARCH_FACET;
alter table BLC_SKU_FEE add constraint FKEEB7181E3E2FC4F9 foreign key (CURRENCY_CODE) references BLC_CURRENCY;
alter table BLC_TAX_DETAIL add constraint FKEABE4A4B3E2FC4F9 foreign key (CURRENCY_CODE) references BLC_CURRENCY;