is00hcw / tungsten-replicator

Automatically exported from code.google.com/p/tungsten-replicator
0 stars 1 forks source link

When generating ddl through ddl scan for redshift, use conditional statements #1087

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

When I run ddlscan using: ddl-mysql-redshift-staging.vm

What is the expected output?

The ddl statements should add a conditional to have them only run if the 
target's of the ddl statements exist.
e.g. CREATE SCHEMA IF NOT EXISTS xxx rather than CREATE SCHEMA xxx
e.g. DROP TABLE IF EXISTS xxx rather than DROP TABLE xxx
Redshift added support for these conditionals a couple of months ago.

What do you see instead?

I get errors that tables do not exist or schemas do not exist.

What version of the product are you using?

tungsten-replicator-3.0.1-64

On what operating system?

mac os x

Original issue reported on code.google.com by tho...@pagerduty.com on 13 Jan 2015 at 10:47