mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
FIX: also include foreign keys without index in drop statement
This commit is contained in:
@@ -130,7 +130,7 @@ public class ModelDiff {
|
||||
existingTable.getCompoundKeys().forEach(it -> addAlterForeignKey(it.dropForeignKey(existingTable.getName())));
|
||||
// Foreign keys through direct mapping (oneToMany)
|
||||
existingTable.allColumns().stream()
|
||||
.filter(it -> it.getForeignKeyIndex() != null)
|
||||
.filter(it -> it.getForeignKeyIndex() != null || it.getForeignKeyName() != null)
|
||||
.map(it -> {
|
||||
AlterForeignKey fk = new AlterForeignKey();
|
||||
fk.setName(it.getForeignKeyName());
|
||||
|
||||
Reference in New Issue
Block a user