Skip to content

Advanced Options

Settings that aren't critical for getting started, but can be useful in certain situations.

Connection

Clear Stored Credentials

For Git and Subversion connections, removes any cached credentials for the current connection or path.

If you authenticated via OAuth, this will clear the token from VersionSQL's cache. However, your browser may still log you in automatically from its cache. To log in as a different OAuth user, log out of your version control system from your web browser before clicking Clear Stored Credentials.

Disconnect from Version Control

Deletes the connection settings file from your computer.

Import/Export Connection

Migrate your connection settings to and from a file. Makes it easier to share configuration between environments or team members.

Enable OAuth

Controls whether VersionSQL uses OAuth when authenticating with this connection's version control host. Enabled by default.

Disable this if your organization blocks OAuth or you prefer to authenticate with a personal access token (PAT) or NTLM without having to close out the OAuth window first. When OAuth is disabled, VersionSQL will fall through to cached credentials, NTLM, or prompt for a username and password.

Scripting

Root Directory

By default, VersionSQL creates a VersionSQL subfolder inside your repository, and layers in the SQL within that. Use this setting to rename that folder.

Include server name and instance name in path

The default folder structure ensures that similarly-named databases across different servers are tracked independently without conflicts. If that isn't relevant in your situation, or you want databases on different servers to share the same repo paths, uncheck this box.

  • Checked (default):
    • /VersionSQL/pc_name/db_server_name/db_name/obj_schema/obj_type/obj_name.sql
  • Unchecked:
    • /VersionSQL/db_name/obj_schema/obj_type/obj_name.sql

Include database name in path

The default folder structure ensures that different databases on the same server are tracked independently without conflicts. If you will only commit a single database to this repo, uncheck this box.

  • Checked (default):
    • /VersionSQL/db_name/obj_schema/obj_type/obj_name.sql
  • Unchecked:
    • /VersionSQL/obj_schema/obj_type/obj_name.sql

Put Schema in File Name Instead of Path

Enable this option to prepend the database schema to the file name, rather than including it as a separate folder in the file path.

  • Checked:
    • .../db_name/obj_type/obj_schema.obj_name.sql
  • Unchecked (default):
    • .../db_name/obj_schema/obj_type/obj_name.sql

Use CREATE OR ALTER

When checked, VersionSQL writes scripts using CREATE OR ALTER for procedures, views, functions, and triggers. This means scripts can be executed successfully without manual modification on a target database regardless of whether the object already exists.

WARNING

Requires SQL Server 2016 SP1 or later. Scripts targeting older versions of SQL Server will produce syntax errors.

Path Compatibility Options

VersionSQL provides a list of path compatibility options for those importing repositories saved by other software.

Security Objects

Configures security object scripting for this database. See Security Object Scripting for more details.

Schedule

Enables automatic scheduled commits for this database. See Automatic Scheduled Commits for more details.

Static Data

Configures static data commits for this database. See Static Data Scripting for more details.

Git Only

These settings only apply to connections using the Git repository type.

Branch

Specifies the existing git branch to use upon first connection. Provided as a time-saving measure. Alternatively, connect first and then switch the connection to the correct branch via the Switch Branch function under the VersionSQL context menu before committing.

WARNING

Important: The branch name specified here must already exist in the repository.

Git Author Information

Specify Git author credentials explicitly on a per-connection basis. If "Autodetect" is checked, VersionSQL will attempt to identify the user's name and email from their account credentials and/or Git global settings.

Folder Only

These settings only apply to connections using the Folder repository type.

Auto-close after-save command

Automatically close the command dialog that opens to run the after-save command. If this is unchecked, the command dialog will remain open.

Custom Menu Commands

Allows you to specify any number of custom commands to place in the VersionSQL context menu.

Preset

Several presets are provided.

The text to display in the VersionSQL context menu. Clicking that text will run this command.

Command

The command to run. This can be quite powerful - check out the presets for inspiration.

Available variables:

  • %filepath - Output script file path
  • %dbpath - Output database folder path
  • %rootdir - Output repository / root folder path
  • %message - If present, prompts the user for a message

Auto-close command window

Whether or not to close the command once it's finished running. If the command's purpose is to provide information to the user, leave this unchecked.

Start commit from output

Kicks off the VersionSQL commit process using a list of files returned from your custom command. Useful for granular commits with custom logic, such as committing only locked files.

Script output should be one path per line, relative to database or repository root. If the path is not specific enough (e.g. just the object name), similarly-named objects may be pulled into the commit. Does not match objects that have been deleted from the database.

Provides a text search for locating setting controls.