File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed
src/NHibernate.Test/NHSpecificTest/GH3530 Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -38,13 +38,12 @@ protected override void OnTearDown()
3838
3939 protected override void CreateSchema ( )
4040 {
41- // Let the SchemaExporter drop and create tables if needed.
42- base . CreateSchema ( ) ;
43-
4441 CreateTable ( "Integer" ) ;
4542 CreateTable ( "DateTime" ) ;
4643 CreateTable ( "Double" ) ;
4744 CreateTable ( "Decimal" ) ;
45+
46+ base . CreateSchema ( ) ;
4847 }
4948
5049 /// <summary>
@@ -83,6 +82,10 @@ private void CreateTable(string name)
8382 cmd . ExecuteNonQuery ( ) ;
8483 }
8584 }
85+ catch ( Exception ex )
86+ {
87+ Assert . Warn ( $ "Creating the schema failed, assuming it already exists. { ex } ") ;
88+ }
8689 finally
8790 {
8891 Sfi . ConnectionProvider . CloseConnection ( cn ) ;
Original file line number Diff line number Diff line change 77 not provide a mechanism of doing this, hence they have a
88 schema-action of 'none'.
99 -->
10- <class name =" IntegerEntity" schema-action =" drop " >
10+ <class name =" IntegerEntity" schema-action =" none " >
1111 <id name =" Id" generator =" guid.comb" />
1212 <property name =" DataValue" column =" DataValue" />
1313 </class >
14- <class name =" DateTimeEntity" schema-action =" drop " >
14+ <class name =" DateTimeEntity" schema-action =" none " >
1515 <id name =" Id" generator =" guid.comb" />
1616 <property name =" DataValue" column =" DataValue" />
1717 </class >
18- <class name =" DoubleEntity" schema-action =" drop " >
18+ <class name =" DoubleEntity" schema-action =" none " >
1919 <id name =" Id" generator =" guid.comb" />
2020 <property name =" DataValue" column =" DataValue" />
2121 </class >
22- <class name =" DecimalEntity" schema-action =" drop " >
22+ <class name =" DecimalEntity" schema-action =" none " >
2323 <id name =" Id" generator =" guid.comb" />
2424 <property name =" DataValue" column =" DataValue" />
2525 </class >
You can’t perform that action at this time.
0 commit comments