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 .
44// Created by: Malisa Ncube
55// Created: 2011.03.17
66
@@ -464,7 +464,9 @@ private void DropAllTables(Schema schema, bool extractCatalogAfterDropping)
464464 batch . Add ( SqlDdl . Alter ( foreignKey . Table , SqlDdl . DropConstraint ( foreignKey ) ) ) ;
465465 foreach ( var view in schema . Views ) {
466466 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+ }
468470 }
469471 foreach ( var table in schema . Tables )
470472 batch . Add ( SqlDdl . Drop ( table ) ) ;
You can’t perform that action at this time.
0 commit comments