private void RemoveTable(Table table) { if ((Context.RunDataLossOperation & DataLossOperation.DropTable) != 0) { Context.NotifyDataLoss("删除表"); foreach (var column in table.FindNormalColumns()) { this.RemoveColumn(column); } this.AddOperation(new DropTable { CopyFromTable = table }); } }
private void AddTable(Table table) { var op = new CreateTable() { CopyFromTable = table }; this.AddOperation(op); foreach (var column in table.FindNormalColumns()) { this.AddColumn(column); } }