Skip to content

Instantly share code, notes, and snippets.

@keomony
Created August 30, 2021 12:45
Show Gist options
  • Save keomony/8136d0ee198df1932ac36d536aeb3e9c to your computer and use it in GitHub Desktop.
Save keomony/8136d0ee198df1932ac36d536aeb3e9c to your computer and use it in GitHub Desktop.
gradle flywayMigrate
> Configure project :
DGS CodeGen added [com.netflix.graphql.dgs.codegen:graphql-dgs-codegen-client-core:5.0.6] to the implementation dependencies.
> Task :flywayMigrate
Migration of schema `booksapi` to version "010 - RENAME PUBLISHER BOOK CONSTRAINTS" failed! Please restore backups and roll back database and code!
> Task :flywayMigrate FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':flywayMigrate'.
> Error occurred while executing flywayMigrate
Migration V010__RENAME_PUBLISHER_BOOK_CONSTRAINTS.sql failed
------------------------------------------------------------
SQL State : 42000
Error Code : 1091
Message : Can't DROP 'FK6buft2dj1d6ig7hekbx7c0ysp'; check that column/key exists
Location : /books-api/src/main/resources/db/migration/V010__RENAME_PUBLISHER_BOOK_CONSTRAINTS.sql (/books-api/src/main/resources/db/migration/V010__RENAME_PUBLISHER_BOOK_CONSTRAINTS.sql)
Line : 1
Statement : ALTER TABLE publisher_book
DROP FOREIGN KEY FK6buft2dj1d6ig7hekbx7c0ysp,
ADD CONSTRAINT publisher_book_publisher_id FOREIGN KEY (publisher_id) REFERENCES publisher (id)
Migration V010__RENAME_PUBLISHER_BOOK_CONSTRAINTS.sql failed
------------------------------------------------------------
SQL State : 42000
Error Code : 1091
Message : Can't DROP 'FK6buft2dj1d6ig7hekbx7c0ysp'; check that column/key exists
Location : /books-api/src/main/resources/db/migration/V010__RENAME_PUBLISHER_BOOK_CONSTRAINTS.sql (/books-api/src/main/resources/db/migration/V010__RENAME_PUBLISHER_BOOK_CONSTRAINTS.sql)
Line : 1
Statement : ALTER TABLE publisher_book
DROP FOREIGN KEY FK6buft2dj1d6ig7hekbx7c0ysp,
ADD CONSTRAINT publisher_book_publisher_id FOREIGN KEY (publisher_id) REFERENCES publisher (id)
Can't DROP 'FK6buft2dj1d6ig7hekbx7c0ysp'; check that column/key exists
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 3s
1 actionable task: 1 executed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment