Hi Jason-
Thanks.
I already version my scripts like so:
Code: Select all
public static void To_23_1_15 () {
string command = @"ALTER TABLE anesthquickbuttons MODIFY QuickButton1 CHAR(50)";
try {
DataCore.GetTable(command);
}
catch { }
<snip>
To_23_1_19();
}
public static void To_23_1_19 () {
string command = @"DROP TABLE IF EXISTS anesthdisplayreport";
DataCore.NonQ(command);
command = @"CREATE TABLE IF NOT EXISTS anesthdisplayreport (
DisplayReportNum bigint NOT NULL auto_increment PRIMARY KEY,
InternalName varchar(255) NOT NULL,
ItemOrder int NOT NULL,
Description varchar(255) NOT NULL,
Category tinyint NOT NULL,
IsHidden tinyint NOT NULL
) DEFAULT CHARSET=utf8";
DataCore.NonQ(command);
command = @"
INSERT INTO anesthdisplayreport(InternalName,ItemOrder,Description,Category,IsHidden) VALUES('CaseSummary',0,'Case Summary',0,0);
INSERT INTO anesthdisplayreport(InternalName,ItemOrder,Description,Category,IsHidden) VALUES('MedsReport',1,'Meds Report',0,0);";
DataCore.NonQ(command);
}
}
And I've always written the Anesthesia Plugin version to the OD Preference table since the dawn of time.
Should I be checking the Preference table and skipping those versions below the plugin version in the db?
Because I notice that it takes 45-60 sec to load everytime I launch OD. I always assumed that OD was checking the script against the running version of OD and skipping any conversions below the running version. Is this incorrect?