You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If two tables have foreign keys with the same name an index is appended in
IRepository.GetAllForeignKeys()
This results to an error in SqlCeDiff.CreateDiffScript(...):
List targetFKs = targetRepository.GetAllForeignKeys().Where(fk => fk.ConstraintTableName == tableName).ToList();
targetFKs has wrong foreign key names resulting in a script like
ALTER TABLE [MyTable] DROP CONSTRAINT [FK_bla_grmpf1];
instead of
ALTER TABLE [MyTable] DROP CONSTRAINT [FK_bla_grmpf];
This problem did not occur in a previous version e.g. 3.5.1.14 (Build 85301)
Temporarly it helped to restore the old algorithm using GetAllForeignKeys(string tableName):
List sourceFKs = sourceRepository.GetAllForeignKeys(tableName);
List targetFKs = targetRepository.GetAllForeignKeys(tableName);
Currently I don't see the necessity to fetch all foreign keys table name independant (and so possibly made
unique) as they are still filtered afterwards with Linq.
But never mind. No offense. The project is still great.
The text was updated successfully, but these errors were encountered:
If two tables have foreign keys with the same name an index is appended in
IRepository.GetAllForeignKeys()
This results to an error in SqlCeDiff.CreateDiffScript(...):
List targetFKs = targetRepository.GetAllForeignKeys().Where(fk => fk.ConstraintTableName == tableName).ToList();
targetFKs has wrong foreign key names resulting in a script like
ALTER TABLE [MyTable] DROP CONSTRAINT [FK_bla_grmpf1];
instead of
ALTER TABLE [MyTable] DROP CONSTRAINT [FK_bla_grmpf];
This problem did not occur in a previous version e.g. 3.5.1.14 (Build 85301)
Temporarly it helped to restore the old algorithm using GetAllForeignKeys(string tableName):
List sourceFKs = sourceRepository.GetAllForeignKeys(tableName);
List targetFKs = targetRepository.GetAllForeignKeys(tableName);
Currently I don't see the necessity to fetch all foreign keys table name independant (and so possibly made
unique) as they are still filtered afterwards with Linq.
But never mind. No offense. The project is still great.
The text was updated successfully, but these errors were encountered: