DB 3.7 --> 3.8, IsFromToInPct (unit for Qfrom/Qto) added to Entities.Test, IBenchInfo, ProcessData..., ver. 3.8.2097
This commit is contained in:
+13
@@ -37,6 +37,7 @@
|
||||
this.upgradeDb_304_305_Button = new System.Windows.Forms.Button();
|
||||
this.upgradeDb_305_306_Button = new System.Windows.Forms.Button();
|
||||
this.upgradeDb_306_307_Button = new System.Windows.Forms.Button();
|
||||
this.upgradeDb_307_308_Button = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// upgradeConfigDBCheckBox
|
||||
@@ -130,11 +131,22 @@
|
||||
this.upgradeDb_306_307_Button.UseVisualStyleBackColor = true;
|
||||
this.upgradeDb_306_307_Button.Click += new System.EventHandler(this.upgradeDb_306_307_Button_Click);
|
||||
//
|
||||
// upgradeDb_307_308_Button
|
||||
//
|
||||
this.upgradeDb_307_308_Button.Location = new System.Drawing.Point(12, 214);
|
||||
this.upgradeDb_307_308_Button.Name = "upgradeDb_307_308_Button";
|
||||
this.upgradeDb_307_308_Button.Size = new System.Drawing.Size(260, 22);
|
||||
this.upgradeDb_307_308_Button.TabIndex = 29;
|
||||
this.upgradeDb_307_308_Button.Text = "Upgrade DB from v.3.7 to v.3.8";
|
||||
this.upgradeDb_307_308_Button.UseVisualStyleBackColor = true;
|
||||
this.upgradeDb_307_308_Button.Click += new System.EventHandler(this.upgradeDb_307_308_Button_Click);
|
||||
//
|
||||
// UpgradeSelectionDlg
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(284, 597);
|
||||
this.Controls.Add(this.upgradeDb_307_308_Button);
|
||||
this.Controls.Add(this.upgradeDb_306_307_Button);
|
||||
this.Controls.Add(this.upgradePipesButton);
|
||||
this.Controls.Add(this.upgradeDb_305_306_Button);
|
||||
@@ -162,5 +174,6 @@
|
||||
private System.Windows.Forms.Button upgradeDb_304_305_Button;
|
||||
private System.Windows.Forms.Button upgradeDb_305_306_Button;
|
||||
private System.Windows.Forms.Button upgradeDb_306_307_Button;
|
||||
private System.Windows.Forms.Button upgradeDb_307_308_Button;
|
||||
}
|
||||
}
|
||||
@@ -414,5 +414,33 @@ namespace TBF.UI.Settings
|
||||
upgradeDb_306_307_Button.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void upgradeDb_307_308_Button_Click(object sender, EventArgs e)
|
||||
{
|
||||
string[] configDbCommands = new string[]
|
||||
{
|
||||
"ALTER TABLE `test` ADD `IsFromToInPct` BOOLEAN NOT NULL DEFAULT FALSE AFTER `Qto`;",
|
||||
};
|
||||
|
||||
string[] resultsDbCommands = new string[] { };
|
||||
|
||||
if (!upgradeConfigDBCheckBox.Checked && !upgradeResultsDBCheckBox.Checked)
|
||||
{
|
||||
MessageBox.Show("No database selected");
|
||||
return;
|
||||
}
|
||||
|
||||
ActivityStart();
|
||||
|
||||
if ((!upgradeConfigDBCheckBox.Checked || configDbCommands.Length == 0 ||
|
||||
ExecuteCommands(new MySqlConnection(TBF.DB.CurrentBench.ProceduresDBSettings.ConnectionString), configDbCommands)) &&
|
||||
(!upgradeResultsDBCheckBox.Checked || resultsDbCommands.Length == 0 ||
|
||||
ExecuteCommands(new MySqlConnection(Results.DB.ConnectionString), resultsDbCommands)))
|
||||
{
|
||||
ActivityEnd();
|
||||
MessageBox.Show("DB succesfully upgraded", "Confirmation", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
upgradeDb_307_308_Button.Enabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user