cancel
Showing results for 
Search instead for 
Did you mean: 

Auto-generated scripts

compaqnx7300
Champ in-the-making
Champ in-the-making
During upgrade of Alfresco the auto-generated scripts are executed. How they are generated? I mean: What files/information is used to auto-generate these scripts?
Thanks for any information Smiley Happy
2 REPLIES 2

mitpatoliya
Star Collaborator
Star Collaborator
Which kind of script you are talking about?
During upgrade from which version to which version?

compaqnx7300
Champ in-the-making
Champ in-the-making
I ask generally about architecture of creating auto-generated scripts.
I try to update from 3.0 to 4.0 on MySQL and upgrade fails because of auto-generated scripts. They try to alter jbpm tables, to add foreign keys and indexes, but these fk and index already exists, for example:

INFO  [domain.schema.SchemaBootstrap] [main] Executing database script /alfresco/alfresco-4.0.c/tomcat/temp/Alfresco/AlfrescoSchema-MySQLInnoDBDialect-Update-6151571554838148656.sql (Generated).
ERROR [domain.schema.SchemaBootstrap] [main] Statement execution failed:
   SQL: alter table JBPM_BYTEARRAY add index FK_BYTEARR_FILDEF (FILEDEFINITION_), add constraint FK_BYTEARR_FILDEF foreign key (FILEDEFINITION_) references JBPM_MODULEDEFINITION (ID_)
   Error: Can't create table 'alfresco1.#sql-6860_11e' (errno: 121)
   File: /alfresco/alfresco-4.0.c/tomcat/temp/Alfresco/AlfrescoSchema-MySQLInnoDBDialect-Update-6151571554838148656.sql
   Line: 35
ERROR [domain.schema.SchemaBootstrap] [main] Schema auto-update failed