dbms
The dbms
attribute is a string that specifies which database Liquibase should run a changeset on. dbms
accepts "short names" of database management systems. Valid values are:
all
: allow this change to deploy to all supported databasesnone
: allow this change to deploy nowhereaerospike
: Aerospikeasany
: SAP SQL Anywherebigquery
: Google BigQuerycassandra
: Apache Cassandracloudspanner
: Spannercockroachdb
: CockroachDBcosmosdb
: Azure Cosmos DBdatabricks
: Databricksdb2
: IBM DB2 on LUWdb2i
: IBM DB2 on idb2z
: IBM DB2 on z/OSderby
: Apache Derbydynamodb
: Amazon DynamoDBedb
: EnterpriseDBfirebird
: Firebirdhana
: SAP HANAh2
: H2 Database Enginehsqldb
: HyperSQL Databaseinformix
: Informixingres
: Ingres Databasemariadb
: MariaDBmaxdb
: SAP MaxDBmongodb
: MongoDBmssql
: Microsoft SQL Servermysql
: MySQLneo4j
: Neo4J Graph Databaseoracle
: Oraclepostgresql
: PostgreSQLredshift
: Amazon Redshiftsnowflake
: Snowflakesqlite
: SQLitesybase
: SAP Adaptive Serverteradata
: Teradatavertica
: Verticayugabytedb
: YugabyteDB
Separate multiple values with commas. Specify that a changeset is not applicable to a particular database type by prefixing with !
The default value is all
.
Uses
If you're deploying a changelog to multiple database management systems (DBMSs), you may want to ensure that a certain changeset is only deployed to one type of database. For example, you might want to deploy some stored logic only to your PostgreSQL databases because the logic uses a keyword that doesn't exist on your Oracle databases. You can specify
Note: Liquibase dynamically uses the database connection URL to determine what database you're currently connected to, not the value of dbms
.
Syntax
SQL example
--liquibase formatted sql
--changeset your.name:1 dbms:postgresql,oracle
create table person (
name varchar(255)
);