Exemple #1
0
        private static void MigrateDbViews()
        {
            Helper.Log("Start migrating database views");

            DataTable dt = SQLSvrDbi.GetViews();

            if (dt != null && dt.Rows.Count > 0)
            {
                foreach (DataRow row in dt.Rows)
                {
                    DbModule module = new DbModule(row["SchemaName"].ToString(),
                        row["ViewName"].ToString(), row["ViewDefinition"].ToString(), 
                        ModuleType.View);

                    module.Migrate();
                }
            }
        
            Helper.Log("Finished migrating database views");
        }
Exemple #2
0
        private static void MigrateDbStoredProcedures()
        {
            Helper.Log("Start migrating stored procedures");
                        
            DataTable dt = SQLSvrDbi.GetStoredProcedures();

            if (dt != null && dt.Rows.Count > 0)
            {
                foreach (DataRow row in dt.Rows)
                {
                    DbModule module = new DbModule(
                        row["SchemaName"].ToString(), row["ProcedureName"].ToString(),
                        row["ProcedureDefinition"].ToString(), ModuleType.StoredProcedure);

                    module.Migrate();
                }
            }
        
            Helper.Log("Finished migrating stored procedures");
        }