public ActionResult GalleryDatabase() { List <string> lst = new List <string>(); DatabaseUpdate du = new DatabaseUpdate(); DatabaseUpdateResponse dbRes = new DatabaseUpdateResponse(); string sqlUpdate = ""; string sqlTest = ""; try { sqlUpdate = GalleryHelper.ReadEmbededScript("CarrotCake.CMS.Plugins.PhotoGallery.tblGallery.sql"); sqlTest = "select * from [information_schema].[columns] where table_name in('tblGalleryImageMeta')"; dbRes = du.ApplyUpdateIfNotFound(sqlTest, sqlUpdate, false); if (dbRes.LastException != null && !string.IsNullOrEmpty(dbRes.LastException.Message)) { lst.Add(dbRes.LastException.Message); } else { lst.Add(dbRes.Response); } } catch (Exception ex) { lst.Add(ex.ToString()); } return(View(lst)); }