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

Fixing migration and index name #4106

Merged
merged 1 commit into from
Sep 19, 2023
Merged

Conversation

galvana
Copy link
Contributor

@galvana galvana commented Sep 15, 2023

Closes #4105

Description Of Changes

The alembic revision --autogenerate command was generating for some tables added in previous tickets. This was due to naming mismatches in the classes or in the migrations themselves.

Code Changes

  • Updating index name for plus_system_history table
  • Adding migration to fix incorrect index names for the messaging_template table

Steps to Confirm

nox -s shell
cd src/fides/api/alembic/
alembic revision --autogenerate -m "check check"

Open the generated file and verify there are no mentions of plus_system_history or plus_system_history

def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    pass
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    pass
    # ### end Alembic commands ###

Pre-Merge Checklist

  • All CI Pipelines Succeeded
  • Issue Requirements are Met
  • Update CHANGELOG.md

@galvana galvana linked an issue Sep 15, 2023 that may be closed by this pull request
@galvana galvana requested a review from adamsachs September 15, 2023 21:48
@galvana galvana marked this pull request as ready for review September 15, 2023 21:53
@cypress
Copy link

cypress bot commented Sep 15, 2023

Passing run #4190 ↗︎

0 4 0 0 Flakiness 0
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.

Details:

Merge 91e2532 into 0f74db2...
Project: fides Commit: eee37bb858 ℹ️
Status: Passed Duration: 00:59 💡
Started: Sep 15, 2023 9:57 PM Ended: Sep 15, 2023 9:58 PM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@codecov
Copy link

codecov bot commented Sep 15, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (0f74db2) 87.39% compared to head (91e2532) 87.39%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4106   +/-   ##
=======================================
  Coverage   87.39%   87.39%           
=======================================
  Files         320      320           
  Lines       19702    19702           
  Branches     2530     2530           
=======================================
  Hits        17219    17219           
+ Misses       2042     2041    -1     
- Partials      441      442    +1     
Files Changed Coverage Δ
src/fides/api/models/system_history.py 78.57% <ø> (ø)

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@adamsachs adamsachs left a comment

Choose a reason for hiding this comment

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

looks good! thanks for the diligence @galvana 👍

do we need/want to ship this in 2.20.0? i don't think it's necessary since it's more of a code maintenance/tech debt thing at this point, just wanted to check.

@galvana
Copy link
Contributor Author

galvana commented Sep 18, 2023

Thanks @adamsachs, this can wait!

@galvana galvana merged commit 4acda8c into main Sep 19, 2023
38 checks passed
@galvana galvana deleted the 4105-fix-incorrect-migrations branch September 19, 2023 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix incorrect migrations
2 participants