Open mailmemani opened 5 years ago
Hi Mailmemani,
I face the same problem for light weight migration. And I found that "tableNameForPreviousRelationship" and "tableNameForRelationship" are different. In "tableNameForPreviousRelationship" use sort but "tableNameForRelationship" does not. This may cause the name for table be different.
I try to remove the sort in function "tableNameForPreviousRelationship" NSArray *names = @[([relationship renamingIdentifier] ? [relationship renamingIdentifier] : [relationship name]), ([inverse renamingIdentifier] ? [inverse renamingIdentifier] : [inverse name])];
This seems work for me. Thanks.
Hi StacyCC,
Thanks, I tried to interchange the tableNameForRelationship
function table names array values.
Like below
NSArray *names = @[[inverse name], [relationship name]];
This also works fine for me.
And I tried to remove the sort function from tableNameForPreviousRelationship
even that works fine for me.
Thanks.
I have introduced a new column in a table A which has MANY to MANY relations with table B.
Lightweight Migration is failing when I modify the table A (Which has Many to Many relations)
Log says while migrating, could not prepare statement: table ecd_A_B already exists
Thanks