File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -45,15 +45,16 @@ private void Init()
4545
4646 if ( removed . Any ( ) )
4747 {
48- var script = new DatabaseScript { Text = BuildDrop ( removed ) , Order = - 1 } ;
48+ // Execute drops before adds; keep non-negative so they aren't filtered out.
49+ var script = new DatabaseScript { Text = BuildDrop ( removed ) , Order = 0 } ;
4950 var container = new DatabaseScriptContainer ( script , "FollowerPermissionChange" ) ;
5051 container . IsValid = ! KustoCode . Parse ( script . Text ) . GetDiagnostics ( ) . Any ( ) ;
5152 Scripts . Add ( container ) ;
5253 }
5354
5455 if ( added . Any ( ) )
5556 {
56- var script = new DatabaseScript { Text = BuildAdd ( added ) , Order = 0 } ;
57+ var script = new DatabaseScript { Text = BuildAdd ( added ) , Order = removed . Any ( ) ? 1 : 0 } ;
5758 var container = new DatabaseScriptContainer ( script , "FollowerPermissionChange" ) ;
5859 container . IsValid = ! KustoCode . Parse ( script . Text ) . GetDiagnostics ( ) . Any ( ) ;
5960 Scripts . Add ( container ) ;
You can’t perform that action at this time.
0 commit comments