Describe the bug
In V010__RENAME_PUBLISHER_BOOK_CONSTRAINTS.sql, we attempt to drop some foreign keys. However, it looks like we've already renamed them, so we need to first check whether the foreign keys with the obscure names exist.
ALTER TABLE publisher_book
DROP FOREIGN KEY FK6buft2dj1d6ig7hekbx7c0ysp,
ADD CONSTRAINT publisher_book_publisher_id FOREIGN KEY (publisher_id) REFERENCES publisher (id);
ALTER TABLE publisher_book
DROP FOREIGN KEY FKnro4ab7u1j42osd4sehbkptrr,
ADD CONSTRAINT publisher_book_book_id FOREIGN KEY (book_id) REFERENCES book (id);
To Reproduce
Steps to reproduce the behavior:
Run the app
See error
Expected behavior
App runs without any build errors.
Describe the bug In
V010__RENAME_PUBLISHER_BOOK_CONSTRAINTS.sql
, we attempt to drop some foreign keys. However, it looks like we've already renamed them, so we need to first check whether the foreign keys with the obscure names exist.To Reproduce Steps to reproduce the behavior:
Expected behavior App runs without any build errors.