Need Liquibase® support? Liquibase Pro is now available! Try it out free.
2018 XML Announcement

Change: ‘createSynonym’

Creates a synonym

Available Attributes

NameDescriptionRequired ForSupportsSince
objectCatalogNameall
objectNameallall
objectSchemaNameall
objectTypedb2all
privateall
replaceIfExistsall
synonymCatalogNameall
synonymNameallall
synonymSchemaNameall
<changeSet author="liquibase-docs"
        id="createSynonym-example"
        objectQuotingStrategy="LEGACY">
    <appdba:createSynonym objectName="A String"
            objectType="A String"
            private="true"
            replaceIfExists="false"
            synonymName="A String"/>
</changeSet>
changeSet:
  id: createSynonym-example
  author: liquibase-docs
  objectQuotingStrategy: LEGACY
  changes:
  - createSynonym:
      objectName: A String
      objectType: A String
      private: true
      replaceIfExists: false
      synonymName: A String
{
  "changeSet": {
    "id": "createSynonym-example",
    "author": "liquibase-docs",
    "objectQuotingStrategy": "LEGACY",
    "changes": [
      {
        "createSynonym": {
          "objectName": "A String",
          "objectType": "A String",
          "private": true,
          "replaceIfExists": false,
          "synonymName": "A String"
        }
      }]
    
  }
}

SQL Generated From Above Sample (SQL Server)

CREATE SYNONYM [A String] FOR [A String];

Database Support

DatabaseNotesAuto Rollback
DB2SupportedNo
DerbyNot SupportedNo
FirebirdNot SupportedNo
H2Not SupportedNo
HyperSQLNot SupportedNo
INGRESNot SupportedNo
InformixNot SupportedNo
MariaDBNot SupportedNo
MySQLNot SupportedNo
OracleSupportedNo
PostgreSQLSupportedNo
SQL ServerSupportedNo
SQLiteNot SupportedNo
SybaseNot SupportedNo
Sybase AnywhereNot SupportedNo