@@ -35,7 +35,11 @@ private BackendConfigurationPnDbContext GetBackendDbContext(string connectionStr
3535 optionsBuilder . UseMySql (
3636 connectionStr . Replace ( "myDb" , "420_eform-backend-configuration-plugin" ) . Replace ( "bla" , "root" ) ,
3737 new MariaDbServerVersion (
38- new Version ( 10 , 8 ) ) ) ;
38+ ServerVersion . AutoDetect ( connectionStr ) ) ,
39+ mySqlOptionsAction : builder => {
40+ builder . EnableRetryOnFailure ( ) ;
41+ builder . TranslateParameterizedCollectionsToConstants ( ) ;
42+ } ) ;
3943
4044 var backendConfigurationPnDbContext = new BackendConfigurationPnDbContext ( optionsBuilder . Options ) ;
4145 var file = Path . Combine ( "SQL" , "420_eform-backend-configuration-plugin.sql" ) ;
@@ -62,7 +66,11 @@ private ItemsPlanningPnDbContext GetItemsPlanningPnDbContext(string connectionSt
6266 optionsBuilder . UseMySql (
6367 connectionStr . Replace ( "myDb" , "420_eform-angular-items-planning-plugin" ) . Replace ( "bla" , "root" ) ,
6468 new MariaDbServerVersion (
65- new Version ( 10 , 8 ) ) ) ;
69+ ServerVersion . AutoDetect ( connectionStr ) ) ,
70+ mySqlOptionsAction : builder => {
71+ builder . EnableRetryOnFailure ( ) ;
72+ builder . TranslateParameterizedCollectionsToConstants ( ) ;
73+ } ) ;
6674
6775 var backendConfigurationPnDbContext = new ItemsPlanningPnDbContext ( optionsBuilder . Options ) ;
6876 var file = Path . Combine ( "SQL" , "420_eform-angular-items-planning-plugin.sql" ) ;
@@ -81,7 +89,11 @@ private TimePlanningPnDbContext GetTimePlanningPnDbContext(string connectionStr)
8189 optionsBuilder . UseMySql (
8290 connectionStr . Replace ( "myDb" , "420_eform-angular-items-planning-plugin" ) . Replace ( "bla" , "root" ) ,
8391 new MariaDbServerVersion (
84- new Version ( 10 , 8 ) ) ) ;
92+ ServerVersion . AutoDetect ( connectionStr ) ) ,
93+ mySqlOptionsAction : builder => {
94+ builder . EnableRetryOnFailure ( ) ;
95+ builder . TranslateParameterizedCollectionsToConstants ( ) ;
96+ } ) ;
8597
8698 var backendConfigurationPnDbContext = new TimePlanningPnDbContext ( optionsBuilder . Options ) ;
8799 var file = Path . Combine ( "SQL" , "420_eform-angular-time-planning-plugin.sql" ) ;
@@ -100,7 +112,11 @@ private CaseTemplatePnDbContext GetCaseTemplatePnDbContext(string connectionStr)
100112 optionsBuilder . UseMySql (
101113 connectionStr . Replace ( "myDb" , "420_eform-angular-case-template-plugin" ) . Replace ( "bla" , "root" ) ,
102114 new MariaDbServerVersion (
103- new Version ( 10 , 8 ) ) ) ;
115+ ServerVersion . AutoDetect ( connectionStr ) ) ,
116+ mySqlOptionsAction : builder => {
117+ builder . EnableRetryOnFailure ( ) ;
118+ builder . TranslateParameterizedCollectionsToConstants ( ) ;
119+ } ) ;
104120
105121 var backendConfigurationPnDbContext = new CaseTemplatePnDbContext ( optionsBuilder . Options ) ;
106122 var file = Path . Combine ( "SQL" , "420_eform-angular-case-template-plugin.sql" ) ;
@@ -116,9 +132,13 @@ private MicrotingDbContext GetContext(string connectionStr)
116132 {
117133 var dbContextOptionsBuilder = new DbContextOptionsBuilder ( ) ;
118134
119- dbContextOptionsBuilder . UseMySql ( connectionStr . Replace ( "myDb" , "420_SDK" ) . Replace ( "bla" , "root" ) ,
120- new MariaDbServerVersion (
121- new Version ( 10 , 8 ) ) ) ;
135+ dbContextOptionsBuilder . UseMySql ( connectionStr . Replace ( "myDb" , "420_SDK" ) . Replace ( "bla" , "root" )
136+ , new MariaDbServerVersion (
137+ ServerVersion . AutoDetect ( connectionStr ) ) ,
138+ mySqlOptionsAction : builder => {
139+ builder . EnableRetryOnFailure ( ) ;
140+ builder . TranslateParameterizedCollectionsToConstants ( ) ;
141+ } ) ;
122142 var microtingDbContext = new MicrotingDbContext ( dbContextOptionsBuilder . Options ) ;
123143 var file = Path . Combine ( "SQL" , "420_SDK.sql" ) ;
124144 var rawSql = File . ReadAllText ( file ) ;
0 commit comments