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

BI-1680 - Added Migration That Removes "Somoclone" Breeding Method #344

Closed
wants to merge 3 commits into from

Conversation

mlm483
Copy link
Contributor

@mlm483 mlm483 commented Apr 1, 2024

Description

Story: BI-1680

Per the Desired Behavior section of the Jira story, I added a migration to remove the "Somoclone" breeding method from the system preset breeding methods.

This bi-web PR takes care of updating the import template.

Dependencies

bi-web branch: feature/BI-1680.

Testing

  1. Checkout this branch, git checkout feature/BI-1680.
  2. Run bi-api.
  3. Ensure that the new migration ran (V1.20.0) by checking the bidb database, SELECT * FROM flyway_schema_history;.
  4. Ensure that the "Somoclone" breeding method is not listed in the DeltaBreed UI, under Program Administration > Breeding Methods.

Checklist:

  • I have performed a self-review of my own code
  • I have tested my code and ensured it meets the acceptance criteria of the story
  • I have tested that my code works with both the brapi-java-server and BreedBase
  • I have create/modified unit tests to cover this change
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to documentation
  • I have run TAF: <please include a link to TAF run>

@mlm483 mlm483 marked this pull request as ready for review April 1, 2024 16:50
@mlm483 mlm483 requested review from a team, davedrp and nickpalladino and removed request for a team April 1, 2024 16:53
@mlm483 mlm483 changed the title [BI-1680] - Added Migration That Removes "Somoclone" Breeding Method BI-1680 - Added Migration That Removes "Somoclone" Breeding Method Apr 1, 2024
@davedrp
Copy link
Contributor

davedrp commented Apr 5, 2024

when the migration was run, the following error was generated...
[ERROR] Failed to execute goal org.flywaydb:flyway-maven-plugin:7.7.3:migrate (default-cli) on project bi-api: org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateException:
[ERROR] Migration V1.21.0__remove_breeding_method.sql failed
[ERROR] ----------------------------------------------------
[ERROR] SQL State : 23503
[ERROR] Error Code : 0
[ERROR] Message : ERROR: update or delete on table "breeding_method" violates foreign key constraint "program_enabled_breeding_methods_breeding_method_id_fkey" on table "program_enabled_breeding_methods"
[ERROR] Detail: Key (id)=(20811b55-6080-459f-aca4-261fb1c95c60) is still referenced from table "program_enabled_breeding_methods".
[ERROR] Where: SQL statement "DELETE FROM breeding_method
[ERROR] WHERE abbreviation = 'SOC' AND name = 'Somoclone'"
[ERROR] PL/pgSQL function inline_code_block line 4 at SQL statement
[ERROR] Location : /Users/drp227/source/bi-api/src/main/resources/db/migration/V1.21.0__remove_breeding_method.sql (/Users/drp227/source/bi-api/src/main/resources/db/migration/V1.21.0__remove_breeding_method.sql)
[ERROR] Line : 18
[ERROR] Statement : /*

davedrp
davedrp approved these changes Apr 9, 2024
@mlm483 mlm483 requested a review from davedrp April 9, 2024 13:39
Copy link
Contributor

@davedrp davedrp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passed Developer testing

@mlm483
Copy link
Contributor Author

mlm483 commented Apr 10, 2024

Closing in favor of #346, which is based on release/0.9.

@mlm483 mlm483 closed this Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants