AWS Redshift
Default Driver
Jdbc Drivers
- PostgreSQL Jdbc Driver
- Redshift Jdbc driver
Sql Script Syntax
Compatibility
- Although Redshift does not provide its own schema export tool, any DDL exported by pg_dump can be used
unchanged in a Flyway migration. Please note that Redshift does not support exporting data using
pg_dump, so you must export only the schema, using
pg_dump -s
.
- Although Redshift does not provide its own SQL client tool, any Redshift SQL script executed by Flyway,
can be executed by the PostgreSQL command-line tool and other PostgreSQL-compatible tools,
such as SQL Workbench/J (after the placeholders have been replaced).
Example
/* Single line comment */
CREATE TABLE test_data (
test_id INT IDENTITY NOT NULL PRIMARY KEY,
value VARCHAR(25) NOT NULL
);
/*
Multi-line
comment
*/
INSERT INTO test_data (value) VALUES ('Hello');
CREATE VIEW value_only AS SELECT value FROM test_data;
CREATE TABLE another_table AS SELECT 'some-data' as name;
-- Placeholder
INSERT INTO ${tableName} (name) VALUES ('Mr. T');
Limitations
Vertica