REQUEST A DEMO

Schema changes are a breeze with SchemaScript

One of our users came to me this week with a request to expand the size of the contact’s job title field. Apparently people now have ridiculously long titles such as Assistant to the Regional Director of Synergistic Business Alliances, Northwest Montana Region.

Using a simple SchemaScript and the Dovetail SchemaEditor, this change is trivial.

Here’s my complete script:

<schemaScript xmlns="http://www.dovetailsoftware.com/2006/10/SchemaScript.xsd">  
     <updateColumn table="contact" name="title">
          <length>100</length>
     </updateColumn>
</schemaScript>

Because I have an XSD that defines what schema scripts should look like, and I used Visual Studio to create my script, I know that my script is valid before actually running it with SchemaEditor. It for some reason I had a typo or I didn’t close a tag, VS would visually let me know.

With my script in place, I simply run SchemaEditor to apply the changes:

schemaeditor.exe -apply

Output Report:

Dovetail SchemaEditor Difference Report
———————————————————————————-
Date: 2007-03-21 12:12:37
Action: Apply
User: gary
Database Name: prod
Input File: C:Program FilesDovetail SoftwareSchemaEditorupdate.contact.title.schemascript.xml
———————————————————————————-
Changed schema
Changed table "contact"
Changed column "title"
Changed "length" from "30" to "100"

Easy breezy, just how it should be.

——-

Gary Sherman
Assistant to the Intermediate Regional Manager for production schema changes and customizations, central Texas Region