This pull request introduces several database schema migrations for the prospects table, focusing on cleaning up unused or redundant columns and standardizing column names.#79
Merged
Conversation
Add SQL migration files and small runner scripts to modify the prospects table. New SQL files drop columns other_photne, subsidiary_of, and subsidiary_of_organization_id, and rename sub_departments and two variants of the person LinkedIn column to linkedin. Corresponding Python runners (using app.utils.db.get_db_connection_direct) execute each ALTER statement and commit the change. Note: both spelled variants of the LinkedIn column and a misspelled other_photne file are included to handle existing inconsistencies.
Add SQL migrations to modify the prospects table: add a nullable name column and populate it from first_name + last_name, and remove mobile_phone and other_phone columns. Include Python runner scripts that execute these migrations using app.utils.db.get_db_connection_direct. SQL uses IF NOT EXISTS / IF EXISTS to make the changes idempotent.
prospects table, focusing on cleaning up unused or redundant columns and standardizing column names.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For each migration, both SQL scripts and corresponding Python scripts to execute the migrations are added.
Schema cleanup and column removal:
prospectstable, includingmobile_phone,other_phone,other_photne(likely a typo),subsidiary_of, andsubsidiary_of_organization_id. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]Column additions and population:
namecolumn to theprospectstable and populated it by concatenatingfirst_nameandlast_name. [1] [2]Column renaming for consistency:
person_linkinkedin_url(and/orperson_linkedin_url) tolinkedinfor clarity and consistency. [1] [2] [3]sub_departmentstodepartmentto standardize naming. [1] [2]Each migration has an associated Python script to apply the change using the database connection utility.