public override bool Save() { var dialect = m_conn.Dialect ?? GenericDialect.Instance; var plan = new AlterPlan(); var opts = new DbDiffOptions(); var log = new CachingLogger(LogLevel.Info); opts.AlterLogger = log; DbDiffTool.AlterDatabase(plan, new DbObjectPairing(m_origDb, m_db), opts); string alterSql = dialect.GenerateScript(dmp => plan.CreateRunner().Run(dmp, opts)); if (!SqlConfirmForm.Run(alterSql, dialect, log)) { return(false); } m_conn.AlterDatabase(plan, opts); objectGridView1.Modified = false; UpdateState(); LoadStructure(); return(true); }
private string GenerateScriptForPlan(AlterPlan plan) { return(GenerateSqlScript(dmp => plan.CreateRunner().Run(dmp, new DbDiffOptions()))); }
private void RunPlan(AlterPlan plan) { RunSqlScript(dmp => plan.CreateRunner().Run(dmp, new DbDiffOptions())); }
public void AlterDatabase(AlterPlan plan, DbDiffOptions opts) { Reload(); plan.CreateRunner().Run(m_conn.DbStruct, opts); SaveToFile(); }