{"id":1091,"date":"2023-10-02T17:17:03","date_gmt":"2023-10-02T09:17:03","guid":{"rendered":"https:\/\/www.tonghin.com.my\/blog\/?p=1091"},"modified":"2023-10-02T17:17:03","modified_gmt":"2023-10-02T09:17:03","slug":"feature-testing-and-sql-script-generation-from-latest-migrations","status":"publish","type":"post","link":"https:\/\/www.tonghin.com.my\/blog\/2023\/10\/02\/feature-testing-and-sql-script-generation-from-latest-migrations\/","title":{"rendered":"Feature Testing and SQL Script Generation from Latest Migrations"},"content":{"rendered":"\n<p>Last week, as a continuation from the previous week, Mr. Peter demonstrated the process of generating certificates with expiration dates a few months from now. These certificates were meant to replace the old ones and could only be used in a designated location. Unfortunately, a portion of the code contained an error, possibly due to a minor oversight. In the initial hours, I made efforts to identify and resolve the bugs. Regrettably, I&#8217;m uncertain about the source of the problem and how to rectify it, leading me to revert back to the previous certificate system and moving on to the next task.<\/p>\n\n\n\n<p>Transitioning to the next task, I was tasked with identifying any issues in a new feature introduced by Mr. Peter. After multiple tests, so far, there are no errors in this feature. Consequently, I proceeded to the subsequent task, which involves cleaning up the data. While I was in the process of establishing the basic CQRS pattern on the application side and adding a button in the module side, I received another assignment to uncover bugs in another part of the application system. Prioritizing this task is crucial since it also aligns with the cleanup initiative.<\/p>\n\n\n\n<p>Reflecting on last week&#8217;s progress, I also learnt something new: generating an SQL script from the latest migration. Initially, I believed I had to perform this task using SQL, but Mr. Peter guided me in the correct approach. To generate an SQL script from the latest migration, I first ensured that the EF Core CLI was installed in the migration folder. Next, I listed the migrations that had been created and inserted a command to generate the SQL script for the most recent migration.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last week, as a continuation from the previous week, Mr. Peter demonstrated the process of generating certificates with expiration dates a few months from now. These certificates were meant to replace the old ones and could only be used in a designated location. Unfortunately, a portion of the code contained an error, possibly due to &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.tonghin.com.my\/blog\/2023\/10\/02\/feature-testing-and-sql-script-generation-from-latest-migrations\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Feature Testing and SQL Script Generation from Latest Migrations&#8221;<\/span><\/a><\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v15.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Feature Testing and SQL Script Generation from Latest Migrations | Tong Hin&#039;s Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.tonghin.com.my\/blog\/2023\/10\/02\/feature-testing-and-sql-script-generation-from-latest-migrations\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Feature Testing and SQL Script Generation from Latest Migrations | Tong Hin&#039;s Blog\" \/>\n<meta property=\"og:description\" content=\"Last week, as a continuation from the previous week, Mr. Peter demonstrated the process of generating certificates with expiration dates a few months from now. These certificates were meant to replace the old ones and could only be used in a designated location. Unfortunately, a portion of the code contained an error, possibly due to &hellip; Continue reading &quot;Feature Testing and SQL Script Generation from Latest Migrations&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.tonghin.com.my\/blog\/2023\/10\/02\/feature-testing-and-sql-script-generation-from-latest-migrations\/\" \/>\n<meta property=\"og:site_name\" content=\"Tong Hin&#039;s Blog\" \/>\n<meta property=\"article:published_time\" content=\"2023-10-02T09:17:03+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\">\n\t<meta name=\"twitter:data1\" content=\"2 minutes\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#organization\",\"name\":\"TONG HIN MACHINERY\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/\",\"sameAs\":[\"https:\/\/www.youtube.com\/channel\/UC60EoxJMNbu8mV0LuEGfrBg\"],\"logo\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#logo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/wp-content\/uploads\/2020\/10\/web_logo_180_180.jpg\",\"width\":180,\"height\":180,\"caption\":\"TONG HIN MACHINERY\"},\"image\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#logo\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#website\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/\",\"name\":\"Tong Hin&#039;s Blog\",\"description\":\"Sharing About Technology\",\"publisher\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/www.tonghin.com.my\/blog\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2023\/10\/02\/feature-testing-and-sql-script-generation-from-latest-migrations\/#webpage\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/2023\/10\/02\/feature-testing-and-sql-script-generation-from-latest-migrations\/\",\"name\":\"Feature Testing and SQL Script Generation from Latest Migrations | Tong Hin&#039;s Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#website\"},\"datePublished\":\"2023-10-02T09:17:03+00:00\",\"dateModified\":\"2023-10-02T09:17:03+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2023\/10\/02\/feature-testing-and-sql-script-generation-from-latest-migrations\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.tonghin.com.my\/blog\/2023\/10\/02\/feature-testing-and-sql-script-generation-from-latest-migrations\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2023\/10\/02\/feature-testing-and-sql-script-generation-from-latest-migrations\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2023\/10\/02\/feature-testing-and-sql-script-generation-from-latest-migrations\/\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/2023\/10\/02\/feature-testing-and-sql-script-generation-from-latest-migrations\/\",\"name\":\"Feature Testing and SQL Script Generation from Latest Migrations\"}}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2023\/10\/02\/feature-testing-and-sql-script-generation-from-latest-migrations\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2023\/10\/02\/feature-testing-and-sql-script-generation-from-latest-migrations\/#webpage\"},\"author\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#\/schema\/person\/81e2366362d8d14b15519395755cee6f\"},\"headline\":\"Feature Testing and SQL Script Generation from Latest Migrations\",\"datePublished\":\"2023-10-02T09:17:03+00:00\",\"dateModified\":\"2023-10-02T09:17:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2023\/10\/02\/feature-testing-and-sql-script-generation-from-latest-migrations\/#webpage\"},\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#organization\"},\"articleSection\":\"Experiential\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.tonghin.com.my\/blog\/2023\/10\/02\/feature-testing-and-sql-script-generation-from-latest-migrations\/#respond\"]}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#\/schema\/person\/81e2366362d8d14b15519395755cee6f\",\"name\":\"nurlailiyuzi\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5c0d4cc6f7fc881bd56d95bdbb0c4c14?s=96&d=mm&r=g\",\"caption\":\"nurlailiyuzi\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/posts\/1091"}],"collection":[{"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/comments?post=1091"}],"version-history":[{"count":2,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/posts\/1091\/revisions"}],"predecessor-version":[{"id":1097,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/posts\/1091\/revisions\/1097"}],"wp:attachment":[{"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/media?parent=1091"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/categories?post=1091"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/tags?post=1091"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}