Fix errore migration with inline per sql 2014
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.IntegryCustomer;
|
||||
import it.integry.ems.migration._base.IntegryCustomerDB;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20241115114016 extends BaseMigration implements MigrationModelInterface {
|
||||
@@ -12,12 +12,12 @@ public class Migration_20241115114016 extends BaseMigration implements Migration
|
||||
return;
|
||||
|
||||
String value = null;
|
||||
if (isCustomer(IntegryCustomer.RossoGargano))
|
||||
if (isCustomerDb(IntegryCustomerDB.RossoGargano_RossoGargano))
|
||||
value = "T";
|
||||
|
||||
createSetup("PVM", "SETUP", "COD_MGRP_RICAMBI", value, "Codice gruppo articoli di ricambio", "COD_MGRP");
|
||||
|
||||
if (isCustomer(IntegryCustomer.RossoGargano)) {
|
||||
if (isCustomerDb(IntegryCustomerDB.RossoGargano_RossoGargano)) {
|
||||
createOrUpdateFunction("f_suggestCodeCodMartRicambi", "\n" +
|
||||
"CREATE FUNCTION [dbo].[f_suggestCodeCodMartRicambi](@codMgrp VARCHAR(5), @codMsgr VARCHAR(5), @codMsfa VARCHAR(5))\n" +
|
||||
" RETURNS VARCHAR(20)\n" +
|
||||
@@ -46,15 +46,13 @@ public class Migration_20241115114016 extends BaseMigration implements Migration
|
||||
"\n" +
|
||||
" END");
|
||||
} else {
|
||||
|
||||
createOrUpdateFunction("f_suggestCodeCodMartRicambi", "CREATE FUNCTION [dbo].[f_suggestCodeCodMartRicambi](@codMgrp VARCHAR(5), @codMsgr VARCHAR(5), @codMsfa VARCHAR(5))\n" +
|
||||
" RETURNS VARCHAR(20)\n" +
|
||||
" WITH INLINE = OFF\n" +
|
||||
"AS\n" +
|
||||
"BEGIN\n" +
|
||||
" DECLARE @partialCode VARCHAR(15);\n" +
|
||||
" SET @partialCode = CONCAT(@codMgrp, @codMsgr, @codMgrp);\n" +
|
||||
" RETURN f_suggestCodeCodMart(@partialCode);\n" +
|
||||
" RETURN dbo.f_suggestCodeCodMart(@partialCode);\n" +
|
||||
"END\n");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user