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

Remove Orphaned Database Table service_inbound_api #1748

Open
4 tasks
kalbfled opened this issue Apr 24, 2024 · 0 comments
Open
4 tasks

Remove Orphaned Database Table service_inbound_api #1748

kalbfled opened this issue Apr 24, 2024 · 0 comments

Comments

@kalbfled
Copy link
Member

kalbfled commented Apr 24, 2024

Description

  • Ticket is understood, and QA has been contacted (if the ticket has a QA label).

Changes for 1685 revised migration 0331_merge_service_api. Before the revision, the migration's "upgrade" function copied all rows in the "service_inbound_api" table to other tables, but it did not drop the table. However, the "downgrade" action contains code to create the table. If it already exists (because it didn't get dropped) this will cause an error during a downgrade. The table still exists in some of our environments even though it is no longer in app/models.py. It exists in Prod with zero rows.

Although the table is not in app/models.py, there is a bit of easily removable tech debt associated with it in the form of a schema and associated tests.

Steps to Reproduce

You would have to rollback over 30 migrations to trigger this problem, which is not going to happen, but you can observe that the "service_inbound_api" table still exists in Prod.

No workaround is necessary.

Impact/Urgency

This is low impact, low urgency, but also a quick fix.

Engineering Checklist

  • In AWS, manually drop the table "service_inbound_api" from any environment in which the table is present
  • In app/service/service_callback_api_schema.py, delete "update_service_inbound_api_schema"
  • Delete associated tests in tests/app/service/test_schema.py

Expected Behavior

-[ ] When I run the unit tests, they all pass.
-[ ] When I deploy the app to an environment after this table is removed, then the app starts without errors and the regression passes.

Additional Info & Resources

@k-macmillan k-macmillan changed the title orphaned database table service_inbound_api Remove Orphaned Database Table service_inbound_api Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants