• Scroll to top of this topic Scroll to Top of Page

  • Print the current topic Print Topic

  • No expanding elements on this page Show/Hide Expanders

Console scenario schema

Here are the samples of the console scenario schema.

<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
elementFormDefault="qualified" attributeFormDefault="unqualified">
  <xs:simpleType name="OperationSide">
    <xs:restriction base="xs:token">
      <xs:enumeration value="left"/>
      <xs:enumeration value="source"/>
      <xs:enumeration value="right"/>
      <xs:enumeration value="target"/>
      <xs:enumeration value="both"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="DatabaseDialectType">
    <xs:restriction base="xs:token">
      <xs:enumeration value="MSSQL"/>
      <xs:enumeration value="Azure"/>
      <xs:enumeration value="Oracle"/>
      <xs:enumeration value="SybaseASE"/>
      <xs:enumeration value="DB2"/>
      <xs:enumeration value="MySQL"/>
      <xs:enumeration value="Postgre"/>
      <xs:enumeration value="Redshift"/>
      <xs:enumeration value="Teradata"/>
      <xs:enumeration value="Greenplum"/>
      <xs:enumeration value="Netezza"/>
      <xs:enumeration value="AzureDwh"/>
      <xs:enumeration value="SybaseIQ"/>
      <xs:enumeration value="Vertica"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="AuthenticationKind">
    <xs:restriction base="xs:token">
      <xs:enumeration value="Windows"/>
      <xs:enumeration value="SQLServer"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="MapAction">
    <xs:restriction base="xs:token">
      <xs:enumeration value="map"/>
      <xs:enumeration value="unmap"/>
      <xs:enumeration value="exclude"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="OperationNameType">
    <xs:restriction base="xs:token">
      <xs:enumeration value="Schema Comparison"/>
      <xs:enumeration value="Schema Synchronization"/>
      <xs:enumeration value="Data Comparison"/>
      <xs:enumeration value="Detailed Data Comparison"/>
      <xs:enumeration value="Data Synchronization"/>
      <xs:enumeration value="Fast Data Comparison"/>
      <xs:enumeration value="Data Migration"/>
      <xs:enumeration value="Settings Comparison"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="MetadataCategoryType">
    <xs:restriction base="xs:token">
      <xs:enumeration value="Tables"/>
      <xs:enumeration value="Views"/>
      <xs:enumeration value="Functions"/>
      <xs:enumeration value="Procedures"/>
      <xs:enumeration value="Defaults"/>
      <xs:enumeration value="Sequences"/>
      <xs:enumeration value="Packages"/>
      <xs:enumeration value="Rules"/>
      <xs:enumeration value="Synonyms"/>
      <xs:enumeration value="User Defined Types"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:attributeGroup name="ConnectionParameters">
    <xs:attribute name="side" type="OperationSide" use="required"/>
    <xs:attribute name="databaseDialect" type="DatabaseDialectType" use="required"/>
    <xs:attribute name="connectionString" type="xs:normalizedString" use="optional"/>
    <xs:attribute name="server" type="xs:normalizedString" use="optional"/>
    <xs:attribute name="port" type="xs:normalizedString" use="optional" default="default"/>
    <xs:attribute name="database" type="xs:normalizedString" use="optional"/>
    <xs:attribute name="authentication" type="AuthenticationKind" use="optional"/>
    <xs:attribute name="userID" type="xs:normalizedString" use="optional"/>
    <xs:attribute name="password" type="xs:normalizedString" use="optional"/>
  </xs:attributeGroup>

  <xs:complexType name="ConnectionType">
    <xs:attributeGroup ref="ConnectionParameters"/>
  </xs:complexType>

  <xs:complexType name="PreferencesType">
    <xs:sequence>
      <xs:element name="Add" minOccurs="0" maxOccurs="unbounded">
        <xs:complexType>
          <xs:attribute name="side" type="OperationSide" use="required"/>
          <xs:attribute name="parent" type="xs:normalizedString" use="optional"/>
          <xs:attribute name="name" type="xs:normalizedString" use="required"/>
          <xs:attribute name="value" type="xs:normalizedString" use="required"/>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="MatchingPreferencesType">
    <xs:sequence>
      <xs:element name="Add" minOccurs="0" maxOccurs="unbounded">
        <xs:complexType>
          <xs:attribute name="side" type="OperationSide" use="required"/>
          <xs:attribute name="category" type="MetadataCategoryType" use="required"/>
          <xs:attribute name="prefix" type="xs:normalizedString" use="optional" default=""/>
          <xs:attribute name="suffix" type="xs:normalizedString" use="optional" default=""/>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="DataType">
    <xs:attribute name="name" type="xs:normalizedString" use="required"/>
    <xs:attribute name="length" type="xs:normalizedString" use="optional"/>
    <xs:attribute name="precision" type="xs:normalizedString" use="optional"/>
    <xs:attribute name="scale" type="xs:normalizedString" use="optional"/>
  </xs:complexType>

  <xs:complexType name="TypeMappingInfo">
    <xs:sequence>
      <xs:element name="TypePair" minOccurs="0" maxOccurs="unbounded">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="LeftType" type="DataType"/>
            <xs:element name="RightType" type="DataType"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:group name="PreferencesGroup">
    <xs:sequence>
      <xs:element name="Preferences" type="PreferencesType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="MatchingPreferences" type="MatchingPreferencesType" minOccurs="0" maxOccurs="1"/>
      <xs:element name="TypeMapping" type="TypeMappingInfo" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
  </xs:group>

  <xs:complexType name="ExportInfo">
    <xs:attribute name="path" type="xs:normalizedString" use="optional" default="auto"/>
    <xs:attribute name="append" type="xs:boolean" use="optional" default="false"/>
  </xs:complexType>

  <xs:complexType name="ExecuteSqlType">
    <xs:simpleContent>
      <xs:extension base="xs:normalizedString">
        <xs:attribute name="side" type="OperationSide" use="required"/>
        <xs:attribute name="path" type="xs:normalizedString" use="optional"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:complexType name="OperationData">
    <xs:sequence>
      <xs:group ref="PreferencesGroup" minOccurs="0" maxOccurs="1"/>
      <xs:element name="ManualMapping" minOccurs="0" maxOccurs="1">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="ObjectPair" minOccurs="0" maxOccurs="unbounded">
              <xs:complexType>
                <xs:attribute name="sourcePath" type="xs:normalizedString" use="required"/>
                <xs:attribute name="targetPath" type="xs:normalizedString" use="required"/>
                <xs:attribute name="action" type="MapAction" use="optional" default="map"/>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="Export" type="ExportInfo" minOccurs="0" maxOccurs="1"/>
    </xs:sequence>
    <xs:attribute name="name" type="OperationNameType" use="required"/>
    <xs:attribute name="sourceScope" type="xs:normalizedString" use="required"/>
    <xs:attribute name="targetScope" type="xs:normalizedString" use="required"/>
  </xs:complexType>

  <xs:group name="Operations">
    <xs:sequence>
      <xs:choice minOccurs="1" maxOccurs="unbounded">
        <xs:element name="ExecuteSql" type="ExecuteSqlType"/>
        <xs:element name="Operation" type="OperationData"/>
      </xs:choice>
    </xs:sequence>
  </xs:group>

  <xs:complexType name="DatabaseCompareSuiteScenarioType">
    <xs:sequence>
      <xs:element name="Connection" type="ConnectionType" minOccurs="1" maxOccurs="2"/>
      <xs:choice minOccurs="0" maxOccurs="1">
        <xs:group ref="PreferencesGroup"/>
        <xs:element name="OpenProject" type="xs:normalizedString"/>
      </xs:choice>
      <xs:group ref="Operations" minOccurs="1" maxOccurs="1"/>
    </xs:sequence>
    <xs:attribute name="version" type="xs:normalizedString" use="optional"/>
  </xs:complexType>
  <xs:element name="DatabaseCompareSuiteScenario" type="DatabaseCompareSuiteScenarioType"/>
</xs:schema>