{"id":1124,"date":"2022-02-18T15:06:14","date_gmt":"2022-02-18T15:06:14","guid":{"rendered":"https:\/\/www.versionsql.com\/help\/documentation\/release-notes\/versionsql-1-8\/"},"modified":"2022-05-23T15:00:29","modified_gmt":"2022-05-23T15:00:29","slug":"versionsql-1-8-scripting","status":"publish","type":"docs","link":"https:\/\/www.versionsql.com\/help\/documentation\/release-notes\/versionsql-1-8-scripting\/","title":{"rendered":"VersionSQL 1.8 &#8211; Scripting"},"content":{"rendered":"<p>What&#8217;s this, a new release? Give the menu a glance to see what&#8217;s been cooking. Might be something tasty! \ud83c\udf68<\/p>\n<p>This version bump brings a plateful of <em>even more scripting<\/em> to the table, with a side of toasts, sprinkled all over with bug fixes.\u00a0 Yum \ud83d\ude0b<\/p>\n<p>(Can&#8217;t wait? <a href=\"\/download\/?ctaid=18notesTop\" target=\"_blank\" rel=\"noopener\">Download it right now!<\/a> Rather have the highlights in bullet-point form? <a href=\"\/changelog\/\">Click here for a concise changelog<\/a>.)<\/p>\n<p>Now on to the good stuff:<\/p>\n<ul>\n<li><strong>Main Courses<\/strong>\n<ul>\n<li><a href=\"#sql-server-agent-job-scripting\">SQL Server Agent Job Scripting<\/a><\/li>\n<li><a href=\"#assembly-ddl-trigger-spatial-and-full-text-index-scripting\">Assembly, DDL Trigger, Spatial and Full-Text Index Scripting<\/a><\/li>\n<\/ul>\n<\/li>\n<li><strong>Side Dishes<\/strong>\n<ul>\n<li><a href=\"#welcome-toasts\">Welcome Toasts<\/a><\/li>\n<li><a href=\"#reminder-toasts\">Reminder Toasts<\/a><\/li>\n<\/ul>\n<\/li>\n<li><strong>Garnishes<\/strong>\n<ul>\n<li><a href=\"#case-change-propagation\">Case Change Propagation<\/a><\/li>\n<li><a href=\"#kdiff-1-8-presets\">KDiff 1.8+ Presets<\/a><\/li>\n<li><a href=\"#minimized-context-menu-delay\">Minimized Context Menu Delay<\/a><\/li>\n<li><a href=\"#script-termination-character\">Script Termination Character<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#bugfixes\">Bugfixes<\/a><\/li>\n<\/ul>\n<h2>Main Courses<\/h2>\n<h3>SQL Server Agent Job Scripting<\/h3>\n<p>Just like too much ghost pepper sauce on your enchilada, a mistake made while editing a SQL job can smolder for a while before you realize something is wrong.\u00a0 As the heat compounds, it may not be clear how to actually <em>fix<\/em> the mess you&#8217;re in.\u00a0 Here&#8217;s a tip:\u00a0 Chug a glass of milk and check your version control server.\u00a0 If you&#8217;ve been committing after every change you&#8217;ll be able to see exactly what happened and how to get back to something pleasantly spicy.<\/p>\n<p>Cheers to Alon R., Herbert B., Jim W., and Michael A. for requesting this feature \ud83c\udf7b<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" style=\"padding: 5px;\" src=\"\/images\/wn-1.8-jobs.gif\" \/><\/p>\n<h3>Assembly, DDL Trigger, Spatial and Full-Text Index Scripting<\/h3>\n<p>Pizza at a Chinese buffet?\u00a0 Mac and cheese on a Mexican menu?\u00a0 Assemblies in a SQL database?\u00a0 <em>Somebody<\/em> must be ordering those, because they exist.\u00a0 If that&#8217;s you&#8230; well, you be you.\u00a0 Go ahead and save those assemblies to version control.\u00a0 Fair warning: Unless you speak base64-encoded binary, it&#8217;ll be hard to tell later what exactly your version control server is serving you.\u00a0 Take good notes.<\/p>\n<p>Maybe you&#8217;re on the other end of the spectrum, ordering esoteric dishes with a perfect accent.\u00a0 More scripts, coming right up!\u00a0 If fancy indexes are your jam, you&#8217;ll find them on your table (script) without asking twice.\u00a0 Database-wide triggers, too.\u00a0 Thanks Sam F. for the call-in!<\/p>\n<h2>Side Dishes<\/h2>\n<h3>Welcome Toasts<\/h3>\n<p>Nothing says homestyle cookin&#8217; like a friendly smiley to say hello when you walk in.\u00a0 VersionSQL has learned a new skill: Hospitality.<\/p>\n<p>If you&#8217;re a regular, don&#8217;t worry.\u00a0 The servers know your usual and will stay out of your way.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1134 size-full aligncenter\" style=\"padding: 5px; margin-bottom: 0;\" src=\"https:\/\/www.versionsql.com\/help\/wp-content\/uploads\/2022\/02\/wn-1.8-welcome-2.gif\" alt=\"\" width=\"557\" height=\"400\" \/><\/p>\n<div style=\"text-align: center; font-size: smaller;\">Table for 2?<\/div>\n<p>&nbsp;<\/p>\n<div class=\"wedocs-callout callout-blue\">\ud83d\udec8 Yes, these little notifications are actually called &#8220;toasts&#8221;.\u00a0 Whether that means a noise followed by hot bread or someone standing up to say nice things about you, I&#8217;ll leave to your own interpretation \ud83e\udd42<\/div>\n<h3>Reminder Toasts<\/h3>\n<p>Things get busy, I understand.\u00a0 It&#8217;s easy to let the little things slide, like checking your changes in to version control.\u00a0 A little nudge can make all the difference.\u00a0 And if you need a little more time, just say so.\u00a0 We&#8217;ll check in later.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1135 aligncenter\" style=\"padding: 5px;\" src=\"https:\/\/www.versionsql.com\/help\/wp-content\/uploads\/2022\/02\/wn-1.8-reminder.gif\" alt=\"\" width=\"557\" height=\"525\" \/><\/p>\n<h2>Garnishes<\/h2>\n<h3>Case Change Propagation<\/h3>\n<p>SQL Server is not case-sensitive (<a href=\"https:\/\/stackoverflow.com\/questions\/1411161\/sql-server-check-case-sensitivity\" target=\"_blank\" rel=\"noopener\">except when it is<\/a>).\u00a0 The Windows filesystem is not case-sensitive (<a href=\"https:\/\/www.howtogeek.com\/354220\/how-to-enable-case-sensitive-folders-on-windows-10\/\" target=\"_blank\" rel=\"noopener\">but can be<\/a>).\u00a0 Git is case-sensitive (<a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/devops\/repos\/git\/repository-settings?view=azure-devops&amp;tabs=browser#case-enforcement-policy\" target=\"_blank\" rel=\"noopener\">but can try not to be<\/a>), and Subversion too (<a href=\"https:\/\/www.visualsvn.com\/support\/topic\/00019\/\" target=\"_blank\" rel=\"noopener\">ditto<\/a>).\u00a0 So what happens when you rename a table in SQL Server\u00a0<em>but only change its case<\/em> (e.g. test -&gt; TEST)?\u00a0 Well, VersionSQL&#8217;s got your back.\u00a0 It&#8217;s not going to scan for objects where the <em>only<\/em> change is the name casing (that&#8217;d waste a lot of time), but if you&#8217;ve edited the script\u00a0<em>and<\/em> changed the object&#8217;s casing it&#8217;ll pass the case change along to version control too.\u00a0 Thanks Eric G. for help untangling this.<\/p>\n<h3>KDiff 1.8+ Presets<\/h3>\n<p>I was surprised and gratified to learn that <a href=\"https:\/\/github.com\/KDE\/kdiff3\" target=\"_blank\" rel=\"noopener\">KDiff3 is still undergoing active development<\/a>.\u00a0 VersionSQL now knows how to find and use it for diff and merges.<\/p>\n<h3>Minimized Context Menu Delay<\/h3>\n<p>The thing that bugs me the most about modern software is when it doesn&#8217;t respond to my input <em>instantly<\/em>.\u00a0 SSMS does a lot of things behind the scenes when you right-click on a database, but one thing it&#8217;s\u00a0<em>not<\/em> doing now is waiting on VersionSQL.\u00a0 VersionSQL 1.8 pre-caches the tiny bit of server info that it needs in order to display the correct context menu entries as quickly as possible.\u00a0 Granted, that only saves 30-70 milliseconds, but it&#8217;s <em>your<\/em> valuable time. Every little bit helps.<\/p>\n<h3>Script Termination Character<\/h3>\n<p>There&#8217;s a <a href=\"https:\/\/stackoverflow.com\/questions\/729692\/why-should-text-files-end-with-a-newline\" target=\"_blank\" rel=\"noopener\">difference<\/a> in <a href=\"https:\/\/en.wikipedia.org\/wiki\/Newline#Interpretation\" target=\"_blank\" rel=\"noopener\">interpretation<\/a> about the &#8220;newline&#8221; character (aka &#8220;end of line&#8221; character &#8211; see the confusion?). VersionSQL now ends the final line of each script with a newline. Here&#8217;s why: If the file doesn&#8217;t end with a newline, the next time you add a line to the end of the file your diff tool will show you that two lines have changed (the line you added, but also the previous line because that newline character had to be added first).\u00a0 This change makes for more understandable diffs.<\/p>\n<h2>Bugfixes<\/h2>\n<p>\ud83c\udf54 Commit shows a warning instead of an error if a table is deleted during scripting (thanks P\u00e9ter!)<\/p>\n<p>\ud83e\udd5e Contact form now drops out to the browser if an unusable proxy is specified<\/p>\n<p>\ud83c\udf55 File overwrite bug caused script fragments to remain if the script being committed was shorter than the one already in the repo (thanks Alon and Sam!)<\/p>\n<p>\ud83e\udd6a Ignored objects are now excluded from batch scripting, not just from change detection (thanks again P\u00e9ter!)<\/p>\n<p>\ud83e\udd57 In rare circumstances, a git commit could be created with the timestamp of a previous commit (thanks Tor!)<\/p>\n<p>\ud83c\udf2d Manual update check now shows a descriptive message if the update server is unavailable<\/p>\n<p>\ud83c\udf68 No longer attempts to push an empty git commit if an error occurred while building the commit<\/p>\n<p>\ud83c\udf70 No longer writes to the error log when a diff started from the commit message prompt aborts due to missing configuration<\/p>\n<h2>Wrapping Up<\/h2>\n<p>Thanks for reading!\u00a0 Compliments to the beta testers.<\/p>\n<p>How about an appetizer? <a href=\"\/download\/?ctaid=18notesBottom\">Download VersionSQL<\/a><\/p>\n<p>Ready to place your order? <a href=\"\/#pricing\">Purchase VersionSQL<\/a><\/p>\n<p>Need more time? <a href=\"mailto:michael@versionsql.com?subject=Extended%20Trial\">Request an extended trial<\/a><\/p>\n<p>As usual, send all bug reports, reviews, complaints, pizza recipes, and sticker requests to <a href=\"mailto:michael@versionsql.com\">michael@versionsql.com<\/a>.<\/p>\n<p>Bon App\u00e9tit!<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":994,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"footnotes":""},"doc_tag":[],"class_list":["post-1124","docs","type-docs","status-publish","hentry"],"comment_count":0,"_links":{"self":[{"href":"https:\/\/www.versionsql.com\/help\/wp-json\/wp\/v2\/docs\/1124","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.versionsql.com\/help\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.versionsql.com\/help\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.versionsql.com\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.versionsql.com\/help\/wp-json\/wp\/v2\/comments?post=1124"}],"version-history":[{"count":32,"href":"https:\/\/www.versionsql.com\/help\/wp-json\/wp\/v2\/docs\/1124\/revisions"}],"predecessor-version":[{"id":1181,"href":"https:\/\/www.versionsql.com\/help\/wp-json\/wp\/v2\/docs\/1124\/revisions\/1181"}],"up":[{"embeddable":true,"href":"https:\/\/www.versionsql.com\/help\/wp-json\/wp\/v2\/docs\/994"}],"next":[{"title":"VersionSQL 1.9 - Branching","link":"https:\/\/www.versionsql.com\/help\/documentation\/release-notes\/versionsql-1-9-branching\/","href":"https:\/\/www.versionsql.com\/help\/wp-json\/wp\/v2\/docs\/1175"}],"prev":[{"title":"VersionSQL 1.7 - Performance","link":"https:\/\/www.versionsql.com\/help\/documentation\/release-notes\/versionsql-1-7-performance\/","href":"https:\/\/www.versionsql.com\/help\/wp-json\/wp\/v2\/docs\/1015"}],"wp:attachment":[{"href":"https:\/\/www.versionsql.com\/help\/wp-json\/wp\/v2\/media?parent=1124"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.versionsql.com\/help\/wp-json\/wp\/v2\/doc_tag?post=1124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}