Hi,
We have migrated our Mendix project from 4.4 to 5.21.5 .After migration(through modeller), we are trying to deploy the deployment package (.mda file created using modeller 5.21.5) in production.While starting the Mendix console, it starts the database syn up but the syn up is getting failed beacuse of the invalid queries that Medix is generating.
I checked the queries(DDL commands), it is trying to create new indexes in the association tables.Already there are indexes with primary key constraint in those tables.Mendix query is just to add new constarint , ideally the query should include drooping off the primary constarint followed by dropping of index and then creating new primary key with new index.
It is creating queries like mentioned below-
ALTER TABLE "MENDIXSYSTEM$ASSOCIATION"
ADD "PK_INDEX_NAME" nvarchar2(255) NULL;
UPDATE "MENDIXSYSTEM$VERSION"
SET "PREANALYSISMIGRATIONVERSIONNUM" = '2.0.1';
ALTER TABLE "DECISI$EMPLOYEE_APLLICATION" MODIFY PRIMARY KEY USING INDEX ( CREATE UNIQUE INDEX "PKIDX_DECIS$EMPLOYEE_APLLICATI" ON "DECISI$EMPLOYEE_APLLICATION" ("DECISIONS$DECISIONHISTORYID", "DECISIONS$APPLICATIONROUTINGID"));
UPDATE "MENDIXSYSTEM$ASSOCIATION" SET "PK_INDEX_NAME" = 'PKIDX_DECIS$EMPLOYEE_APLLICATI' WHERE "ID" = '5c79d155-fdc7-4012-bfed-84b3c4a172d8';
ALTER TABLE "MOIEGYPTUTIL$MOICALLCONF_CLIEN" MODIFY PRIMARY KEY USING INDEX ( CREATE UNIQUE INDEX "PKIDX_MOIEGYPTU$MOICALLCO_CLIE" ON "MOIEGYPTUTIL$MOICALLCONF_CLIEN" ("MOIEGYPTUTILIT$MOICALLCONFIGID", "ADMINISTRATION$CLIENTID"));
UPDATE "MENDIXSYSTEM$ASSOCIATION" SET "PK_INDEX_NAME" = 'PKIDX_MOIEGYPTU$MOICALLCO_CLIE' WHERE "ID" = 'dd8251e5-374e-436b-a18a-b416486b1751';
The commands highlighted bold with italicas are not able to execute.The error coming is - SQL Error: ORA-01408: such column list already indexed 01408. 00000 - "such column list already indexed". This error is coming as the tables have indexes already with primary key.To create new index it should first drop the primary key along with index and then create new primary key with index.
There are so many DDL commnads that have the problem. Has anyone faced such type of issue in migration and what could be the possible resolution for this issue?
There is one workaroung that I can think is to copy the data syn up queries , correct them, add missing DDL commands and run them one be one manually in SQL developer.
I am not sure whether it will create any problem in the database or not and following this approach will have a large downtime of production database.
Please let me know if there is any solution for this issue.
Regards,
Himanshu Singh