File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Orm/Xtensive.Orm.Tests.Sql/MySQL Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 1
- // Copyright (C) 2003-2010 Xtensive LLC.
2
- // All rights reserved .
3
- // For conditions of distribution and use, see license .
1
+ // Copyright (C) 2011-2022 Xtensive LLC.
2
+ // This code is distributed under MIT license terms .
3
+ // See the License.txt file in the project root for more information .
4
4
// Created by: Malisa Ncube
5
5
// Created: 2011.03.17
6
6
@@ -464,7 +464,9 @@ private void DropAllTables(Schema schema, bool extractCatalogAfterDropping)
464
464
batch . Add ( SqlDdl . Alter ( foreignKey . Table , SqlDdl . DropConstraint ( foreignKey ) ) ) ;
465
465
foreach ( var view in schema . Views ) {
466
466
batch . Add ( SqlDdl . Drop ( view ) ) ;
467
- schema . Tables . Remove ( schema . Tables [ view . Name ] ) ;
467
+ if ( schema . Tables [ view . Name ] != null ) {
468
+ _ = schema . Tables . Remove ( schema . Tables [ view . Name ] ) ;
469
+ }
468
470
}
469
471
foreach ( var table in schema . Tables )
470
472
batch . Add ( SqlDdl . Drop ( table ) ) ;
You can’t perform that action at this time.
0 commit comments