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

[Issue 649] Rename opportunity table to use our naming schema #767

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

chouinar
Copy link
Collaborator

@chouinar chouinar commented Nov 27, 2023

Summary

Fixes #649

Time to review: 3 mins

Changes proposed

Rename the opportunity table from topportunity as well as adjust several columns to use our naming

Context for reviewers

This is intended as a precursor to some work where we'll setup the copy from DMS to our DB tables. As we can rename columns/tables with DMS, we can follow some of our conventions (not starting tables with t and slightly clearer column names like opportunity_number instead of oppnumber).

Note this deletes the existing table and makes a new one in the DB migrations, the code is renaming the tables, but Alembic can't detect renames (I think you can manually write the migrations to do renames, but not much point here). As we have nothing in the tables, this is fine, and makes sense to do before we start setting anything up for DMS.

Additional information

What the DB now looks like:
Screenshot 2023-11-27 at 4 15 02 PM

@acouch
Copy link
Collaborator

acouch commented Nov 28, 2023

(nit): Make sure to follow PR title and commit format before merging.

# ### end Alembic commands ###


def downgrade():
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does it make sense to clean this up and just remove the migration that created the t* tables, and reorder the order of the upgrades? Not sure the creation / deletion needs to stay in the history for something we never used.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We could, but not until later. We need these delete migrations to delete the tables that exist already in our dev/prod environments (that, or we would need to manually delete the tables).

@chouinar chouinar changed the title Rename opportunity table to use our naming schema [Issue 649] Rename opportunity table to use our naming schema Dec 11, 2023
@chouinar chouinar merged commit fff0fcf into main Dec 11, 2023
7 checks passed
@chouinar chouinar deleted the chouinar/adjust-opp-naming branch December 11, 2023 16:39
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.

[Task]: Create DMS task rules to copy opportunity table
3 participants