This commit is contained in:
2023-07-14 19:35:41 +00:00
parent a841fc0077
commit b5753a02d4

View File

@@ -413,10 +413,13 @@ namespace AyaImport
} }
else else
{ {
#if(DEBUG)
#if(ATTEMPT_UPGRADE_FROM_142) #if(ATTEMPT_UPGRADE_FROM_142)
//cmd.CommandText = ("update blah set blah = blah"); //cmd.CommandText = ("update blah set blah = blah");
//cmd.ExecuteNonQuery(); //cmd.ExecuteNonQuery();
nVersion = 171; UpdateCEDatabaseSchema.go(conn, nVersion);
nVersion = 171;//if this update works then the version is now 171
#endif
#endif #endif
if (nVersion > 170) if (nVersion > 170)
@@ -4592,10 +4595,11 @@ namespace AyaImport
//etc etc etc //etc etc etc
private static OleDbCommand cmd = null; private static OleDbCommand cmd = null;
private static void executeQuery(string q){ private static void executeQuery(string q)
{
cmd.CommandText = q; cmd.ExecuteNonQuery(); cmd.CommandText = q; cmd.ExecuteNonQuery();
} }
private static void go(System.Data.OleDb.OleDbConnection conn, int nVersion) public static void go(System.Data.OleDb.OleDbConnection conn, int nVersion)
{ {
cmd = new OleDbCommand(); cmd = new OleDbCommand();
cmd.Connection = conn; cmd.Connection = conn;
@@ -6008,7 +6012,6 @@ private static void go(System.Data.OleDb.OleDbConnection conn, int nVersion)
case 154: //update for v1721 case 154: //update for v1721
{ {
executeQuery("ALTER TABLE users ADD COLUMN schedrnd YESNO;"); executeQuery("ALTER TABLE users ADD COLUMN schedrnd YESNO;");
executeQuery("UPDATE users SET users.schedrnd = True;"); executeQuery("UPDATE users SET users.schedrnd = True;");