* Fixed: Specified key was too long; max key length is 767 bytes for ProductPromoCodeEmail entity. (OFBIZ-5426) The problem is in the entity model. An email address should not be used in the primary key - mainly because an email address is case-insensitive. A better design would be to use the email address contact mechanism ID in the primary key. Done Following: 1. Changed Entity Name from ProductPromoCodeEmail to ProductPromoCodeContMech 2. Related Changes for the entity name change 3. Migration service to migrate old data Thanks, Leon for the report and Adrian Crum, Jacques Le Roux, Ingo Wolfmayr, Deepak Dixit, Pierre Smits and Gil Portenseigne for the discussion and review. * Improved: Added new line in service definition file and lincence in MigrationServices file. (OFBIZ-5426) Thanks, Jacopo for the review.
33 lines
1.4 KiB
XML
33 lines
1.4 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<!--
|
|
Licensed to the Apache Software Foundation (ASF) under one
|
|
or more contributor license agreements. See the NOTICE file
|
|
distributed with this work for additional information
|
|
regarding copyright ownership. The ASF licenses this file
|
|
to you under the Apache License, Version 2.0 (the
|
|
"License"); you may not use this file except in compliance
|
|
with the License. You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing,
|
|
software distributed under the License is distributed on an
|
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
KIND, either express or implied. See the License for the
|
|
specific language governing permissions and limitations
|
|
under the License.
|
|
-->
|
|
|
|
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
|
|
<description>Product Component Services</description>
|
|
<vendor>OFBiz</vendor>
|
|
<version>1.0</version>
|
|
|
|
<service name="migrateProductPromoCodeEmail" engine="java"
|
|
location="org.apache.ofbiz.product.migrate.MigrationServices" invoke="migrateProductPromoCodeEmail" auth="true">
|
|
<description>Copy the ProductPromoCodeEmail entity to ProductPromoCodeContactMech</description>
|
|
<permission-service service-name="productPriceGenericPermission" main-action="CREATE"/>
|
|
</service>
|
|
</services>
|