Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redshift - Support for ALTER TABLE ALTER COLUMN #2438

Closed
anjo-swe opened this issue Jul 10, 2019 · 2 comments

Comments

@anjo-swe
Copy link

commented Jul 10, 2019

Which version and edition of Flyway are you using?

5.2.4

Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)

Command line

Which database are you using (type & version)?

Redshift

Which operating system are you using?

Linux

What did you do?

Ran a migration to update a table inside Redshift

ALTER TABLE lorem.my_table_name ALTER COLUMN type type varchar(30); 
What did you expect to see?
  • Table should be altered
  • Statement shouldn't be executed inside a transaction
What did you see instead?
ERROR: ALTER TABLE ALTER COLUMN cannot run inside a transaction block
References

https://docs.aws.amazon.com/redshift/latest/dg/r_ALTER_TABLE.html

ALTER COLUMN column_name TYPE new_data_type
...

  • You can't alter columns inside a multi-statement block (BEGIN...END).

https://github.com/flyway/flyway/blob/master/flyway-core/src/main/java/org/flywaydb/core/internal/database/redshift/RedshiftParser.java#L45

  • Need to check for ALTER TABLE ALTER COLUMN as well

Related to: #1879

@MikielAgutu

This comment has been minimized.

Copy link
Contributor

commented Jul 31, 2019

Thanks for the bug report, this is fixed and will be released in v6.

@ajayl-tubi

This comment has been minimized.

Copy link

commented Aug 8, 2019

@anjo-swe Thanks for the fix! @MikielAgutu When is the v6 planned to release? As our team needs this fix soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.