/// <summary> /// データベース作成用SQL文を生成する /// </summary> /// <param name="designFileName"></param> /// <param name="layoutType"></param> private void DoCreateSqlScript(string designFileName, LayoutType layoutType) { try { ScriptOptions opts; if (layoutType == LayoutType.Live) { Logging.OutputFileName = "LiveDBCreater.sql"; opts = ScriptOptions.DropTables | ScriptOptions.CreateTables | ScriptOptions.CreateDropDescriptions | ScriptOptions.DropDropDescriptions; } else { Logging.OutputFileName = "SeedDBCreater.sql"; opts = ScriptOptions.CreateTables | ScriptOptions.DropTables | ScriptOptions.CreateDropDescriptions | ScriptOptions.DropDropDescriptions; } TableCreator creator = new TableCreator(reportHandler); creator.CreateDBScript(layoutType, designFileName, opts); } finally { Logging.OutputFileName = ""; } }
/// <summary> /// データベース作成用SQL文を生成する /// </summary> /// <param name="designFileName"></param> /// <param name="layoutType"></param> private void DoCreateSqlScript(TableCreateInfo createInfo) { TableCreator creator = new TableCreator(reportHandler); creator.CreateDBScript(createInfo); }