documentation/Reference/Database Driver Reference/Babelfish.md
{% include database-boilerplate.html %}
Babelfish for Aurora PostgreSQL is an AWS-managed capability that allows Aurora PostgreSQL to understand SQL Server wire protocol (TDS) and T-SQL. Flyway connects to Babelfish using the standard SQL Server JDBC driver on port 1433, so the same flyway-sqlserver dependency is used.
Flyway automatically detects a Babelfish endpoint by querying SERVERPROPERTY('Babelfish') and activates Babelfish-specific behaviour.
| Item | Details |
|---|---|
| URL format | <code>jdbc:sqlserver://<i>cluster-endpoint</i>:1433;databaseName=<i>database</i></code> |
| SSL support | Supported |
| Ships with Flyway Command-line | Yes |
| Maven Central coordinates | com.microsoft.sqlserver:mssql-jdbc |
| Supported versions | 10.0 and later |
| Default Java class | com.microsoft.sqlserver.jdbc.SQLServerDriver |
Babelfish support is included in the SQL Server dependency for Flyway.
<dependency>
<groupId>com.redgate.flyway</groupId>
<artifactId>flyway-sqlserver</artifactId>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-sqlserver</artifactId>
</dependency>
buildscript {
dependencies {
implementation "com.redgate.flyway:flyway-sqlserver"
}
}
buildscript {
dependencies {
implementation "org.flywaydb:flyway-sqlserver"
}
}
Use a non-default schema to avoid conflicts with the Babelfish-reserved dbo schema:
[environments.default]
url = "jdbc:sqlserver://my-cluster.cluster-abc123.eu-west-1.rds.amazonaws.com:1433;databaseName=master"
user = "admin"
password = "..."
defaultSchema = "my_schema"
GO is required to separate batch boundaries (e.g. between DROP VIEW and CREATE VIEW)Not all T-SQL syntax is supported by Babelfish. Refer to the Babelfish compatibility documentation for the full list of unsupported features. Known incompatibilities encountered with Flyway include:
CREATE OR ALTER VIEW is not supported. Use DROP VIEW + GO + CREATE VIEW instead:IF OBJECT_ID('my_schema.my_view', 'V') IS NOT NULL DROP VIEW my_schema.my_view;
GO
CREATE VIEW my_schema.my_view AS
SELECT id, name FROM my_schema.my_table;
/* Single line comment */
CREATE TABLE ${flyway:defaultSchema}.customers (
customer_id INT NOT NULL,
name VARCHAR(100) NOT NULL
);
GO
/*
Multi-line
comment
*/
INSERT INTO ${flyway:defaultSchema}.customers (customer_id, name)
VALUES (1, 'Example Customer');
GO
-- Placeholder
INSERT INTO ${tableName} (name) VALUES ('Mr. T');
CREATE ASSEMBLY) are not supported.defaultSchema property should be set to a non-dbo schema to avoid conflicts with Babelfish internals.Only foundation-level capabilities (migrations) are supported. Advanced capabilities like generation of SQL, state-based workflows or drift detection will not currently work