private List<String> findForeignKeyToRemove(TableModel tableModel){
  List<String> removeRelations=new ArrayList<String>();
  List<String> foreignKeyColumns=getForeignKeyColumns(tableModel);
  String selfTableName=tableModel.getTableName();
  for (  String foreignKeyColumn : foreignKeyColumns) {
    String associatedTableName=DBUtility.getTableNameByForeignColumn(foreignKeyColumn);
    if (shouldDropForeignKey(selfTableName,associatedTableName)) {
      removeRelations.add(foreignKeyColumn);
    }
  }
  LogUtil.d(TAG,"findForeignKeyToRemove >> " + tableModel.getTableName() + " "+ removeRelations);
  return removeRelations;
}

private List < String > findForeignKeyToRemove ( TableModel tableModel ) { List < String > removeRelations = new ArrayList < String > ( ) ; List < String > foreignKeyColumns = getForeignKeyColumns ( tableModel ) ; String selfTableName = tableModel . getTableName ( ) ; for ( String foreignKeyColumn : foreignKeyColumns ) { String associatedTableName = DBUtility . getTableNameByForeignColumn ( foreignKeyColumn ) ; if ( shouldDropForeignKey ( selfTableName , associatedTableName ) ) { removeRelations . add ( foreignKeyColumn ) ; } } LogUtil . d ( TAG , "findForeignKeyToRemove >> " + tableModel . getTableName ( ) + " " + removeRelations ) ; return removeRelations ; }
this method gives back the names of the foreign key columns that need to remove , cause their associations in the classes are no longer exist .
