Hi,

There's a problem in database generation that happens on many of the appfuse
mvn commands. Appfuse (one of its components) tries to create both and index
and a foreign key constraint that have the same name. MySQL 5.0.45 doesn't
like this. Here's the relevant error message:

alter table Cities add index FK7852A76988791B0F (FK_regionID), add
constraint FK
7852A76988791B0F foreign key (FK_regionID) references Regions (regionId);
[CompraVenta] ERROR [main] SchemaExport.create(274) | Unsuccessful: alter
table
Cities add index FK7852A76988791B0F (FK_regionID), add constraint
FK7852A7698879
1B0F foreign key (FK_regionID) references Regions (regionId)
[CompraVenta] ERROR [main] SchemaExport.create(275) | Duplicate key name
'FK7852
A76988791B0F'

alter table Cities add index FK7852A769CB36233B (FK_CountryID), add
constraint F
K7852A769CB36233B foreign key (FK_CountryID) references Countries
(countryId);
[CompraVenta] ERROR [main] SchemaExport.create(274) | Unsuccessful: alter
table
Cities add index FK7852A769CB36233B (FK_CountryID), add constraint
FK7852A769CB3
6233B foreign key (FK_CountryID) references Countries (countryId)
[CompraVenta] ERROR [main] SchemaExport.create(275) | Duplicate key name
'FK7852
A769CB36233B'

Also, I'm noticing double indices on many tables for foreign key columns. 
E.g. on a column FK_ValidityId will see two indices:
One called FK_ValidityId
The other called e.g. FK8C9C1DB79781110B

Perhaps mySQL adds and index by default and then appfuse adds another during
the generation process. 

cheers,

Marc
-- 
View this message in context: 
http://www.nabble.com/Appfuse-tries-to-create-index-and-constraint-of-same-name-tp14753891s2369p14753891.html
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to