Using Versioning

Data Modeler provides integrated support for using the Subversion versioning and source control system with Data Modeler designs. You can store designs in a Subversion repository to achieve the usual benefits version control, including:

The Data Modeler documentation does not provide detailed information about SVN concepts and operations; it assumes that you know them or can read about them. For information about Subversion, see http://subversion.tigris.org/. For Subversion documentation, see http://svnbook.red-bean.com/.

To access the versioning features of Data Modeler, use the Versioning menu.

If you create any versioning repositories or connect to any existing repositories, you can use the hierarchical display of repositories and their contents in the Versioning navigator. (If that navigator is not visible, click View, then Versioning.)

Related Topics

About Subversion and Data Modeler

Basic Workflow: Using Subversion with a Design

Data Modeler Concepts and Usage

About Subversion and Data Modeler

Before you can work with a Subversion repository through Data Modeler, you must create a connection to it. When you create a local Subversion repository, a connection to it is automatically created, and this can be seen in the Subversion Navigator. You can subsequently edit the connection details.

Existing files must be imported into the Subversion repository to bring them under version control. Files are then checked out from the Subversion repository to a local folder known as the "Subversion working copy". Files created in Data Modeler must be stored in the Subversion working copy.

Files newly created within Data Modeler must be added to version control. Changed and new files are made available to other users by committing them to the Subversion repository. The Subversion working copy can be updated with the contents of the Subversion repository to incorporate changes made by other users.

Pending Changes

The Pending Changes window is displayed if you click Versioning, then Pending Changes, or when you initiate an action that changes the local source control status of a file. This window shows files that have been added, modified or removed (locally or remotely), files whose content conflicts with other versions of the same file files that have not been added to source control files that are being watched, and files for which editors have been obtained. You can use this information to detect conflicts and to resolve them where possible.

The Outgoing Changes pane shows changes made locally, the Incoming Changes pane shows changes made remotely, and the Candidates pane shows files that have been created locally but not yet added to source control. You can double-click file names to edit them, and you can use the context menu to perform available operations.

Basic Workflow: Using Subversion with a Design

To use Subversion with a Data Modeler design, you must have the following:

The following are suggested basic steps. They are not the only possible steps or necessarily the "best" steps for a given project. These steps reflect the use of the Versioning navigator and the Import wizard within Data Modeler to perform many actions; however, many actions can alternatively be performed using a separate SVN repository browser (such as the TortoiseSVN browser) and using SVN commands on your local system.

  1. On your local system, create a directory or folder to serve as the parent for design-specific working directories. For example, on a Windows PC create:

    C:\designs
    
  2. On your local system, create a directory or folder under the one in the preceding step to serve as the working directory for the design you plan to create. For example, for a design to be named library, create:

    C:\designs\library
    
  3. In Data Modeler, create the design (for example, the library design in Data Modeler Tutorial: Modeling for a Small Database), and save the design to the working directory that you created For example, save the design to:

    C:\designs\library
    

    Saving the design causes the .dmd file and the related directory structure to be created in the working directory. (The .dmd file and the directory structure are explained in Database Design.)

  4. Close the design. (Do not exit Data Modeler.)

  5. Create an SVN connection to the repository that you want to use.

    1. In the Versioning navigator, right-click the top-level node (Subversion) and select New Repository Connection.

    2. In the Subversion: Create/Edit Subversion Connection dialog box, complete the information. Example repository URL: https://example.com/svn/designs/

  6. Create a branches directory under the repository path.

    1. In the Versioning navigator, right-click the repository path and select New Remote Directory.

    2. In the Subversion: Create Remote Directory dialog box, complete the information, specifying the Directory Name as branches.

  7. Create a project-specific branch under the branches directory.

    1. In the Versioning navigator, right-click the branches directory and select New Remote Directory.

    2. In theSubversion: Create Remote Directory dialog box, complete the information. Example Directory Name: library

      For example, if you plan to create the library design in Data Modeler Tutorial: Modeling for a Small Database, the URL in the repository for this branch might be:

      https://example.com/svn/designs/branches/library
      
  8. Use the Subversion: Import to Subversion wizard to import the design files into the repository. Click Versioning, then Import Files, and complete the wizard pages as follows.

    1. Destination: Specify the SVN connection and the repository path into which to import the files. Example: root/branches/library

    2. Source: Specify the source directory from which to import the files (that is, the directory containing the .dmd file and the design-specific folder hierarchy). Example: C:\designs\library

    3. Filters: Accept the defaults and click Next.

    4. Options: Accept the defaults and click Next.

    5. Summary: View the information and click Finish.

      The SVN Console Log shows the progress as files are added. After the files are added, the Handle New Files dialog box is displayed.

    6. In the Handle New Files dialog box, select Do Not Open Files and click OK.

    7. To see the files that have been added, click the Refresh icon in the Versioning navigator tab.

For subsequent work on the design, follow the usual workflow for Subversion-based projects (SVN Update, SVN Lock, modify files, SVN Commit).