@@ -125,7 +125,7 @@ private static IList<NodeAction> GetUnsafeActions(ICollection<NodeAction> action
125125 GetUnsafeColumnTypeChanges ( actions , hints , unsafeActions ) ;
126126 GetUnsafeColumnRemovals ( actions , hints , unsafeActions ) ;
127127 GetUnsafeTableRemovals ( actions , hints , unsafeActions ) ;
128- GetUnsafeDataActions ( actions , hints , unsafeActions ) ;
128+ GetCrossHierarchicalMovements ( actions , unsafeActions ) ;
129129
130130 return unsafeActions ;
131131 }
@@ -225,33 +225,14 @@ private static void GetUnsafeTableRemovals(IEnumerable<NodeAction> actions, IEnu
225225 . ForEach ( output . Add ) ;
226226 }
227227
228- private static void GetUnsafeDataActions ( IEnumerable < NodeAction > actions , IEnumerable < UpgradeHint > hints , ICollection < NodeAction > output )
229- {
230- GetCrossHierarchicalMovements ( actions , output ) ;
231- GetTableRecreateDataLossActions ( actions , output ) ;
232- }
233-
234228 private static void GetCrossHierarchicalMovements ( IEnumerable < NodeAction > actions , ICollection < NodeAction > output )
235229 {
236230 ( from action in actions . OfType < DataAction > ( )
237231 let deleteDataHint = action . DataHint as DeleteDataHint
238- where deleteDataHint != null && ( deleteDataHint . PostCopy || deleteDataHint . TableChangedOwner )
232+ where deleteDataHint != null && deleteDataHint . IsUnsafe
239233 select action ) . ForEach ( output . Add ) ;
240234 }
241235
242- private static void GetTableRecreateDataLossActions ( IEnumerable < NodeAction > actions , ICollection < NodeAction > output )
243- {
244- actions . OfType < DataAction > ( )
245- . Select ( da => new {
246- DataAction = da ,
247- Difference = da . Difference as NodeDifference ,
248- DeleteDataHint = da . DataHint as DeleteDataHint
249- } )
250- . Where ( a => a . DeleteDataHint != null && a . Difference != null && a . Difference . MovementInfo . HasFlag ( MovementInfo . Removed | MovementInfo . Created ) )
251- . Select ( a => a . DataAction )
252- . ForEach ( output . Add ) ;
253- }
254-
255236 private static bool IsTypeChangeAction ( PropertyChangeAction action )
256237 {
257238 return action . Properties . ContainsKey ( "Type" )
0 commit comments