Skip to content

This pull request introduces two main sets of changes: enhancements to the LLM (Large Language Model) records for improved searchability, and a significant cleanup of the prospects table by removing unused columns. #76

Merged
goldlabelapps merged 2 commits into
masterfrom
staging
Apr 9, 2026

Conversation

@goldlabelapps
Copy link
Copy Markdown
Owner

Additionally, the application version is incremented to reflect these updates.

LLM Table Enhancements:

  • Added a new search_vector column (type tsvector) to the llm table to support full-text search, along with a GIN index for faster querying. Migration scripts and a Python runner are included. [1] [2]
  • Updated LLM record insertion logic to automatically generate the search_vector from the prompt and completion fields.
  • Modified API endpoints and queries to include the search_vector field in LLM record retrievals, ensuring it is returned in API responses where appropriate. [1] [2] [3] [4] [5]

Prospects Table Cleanup:

  • Dropped multiple unused columns from the prospects table, including: cleaned, do_not_call, email_confidence, home_phone, primary_email_catchall_status, primary_intent_score, primary_intent_topic, qualify_contact, secondary_intent_score, secondary_intent_topic, tertiary_email, tertiary_email_source, tertiary_email_status, tertiary_email_verification_source, and work_direct_phone. Each column removal is handled by its own migration script. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15]

Other:

  • Bumped the application version from 2.1.8 to 2.1.9.

Bump version to 2.1.9 and add full-text search support to the llm table: include search_vector in SELECTs, generate it on insert using to_tsvector('english', prompt || ' ' || completion), and add a migration + runner to create the tsvector column and GIN index. Update prospects endpoint to return the llm search_vector and adjust result field mapping. Add several SQL migration files to drop unused columns from the prospects table (cleaned, primary_email_catchall_status, primary_intent_score, primary_intent_topic, qualify_contact, secondary_intent_score, secondary_intent_topic, tertiary_email, tertiary_email_source, tertiary_email_status, tertiary_email_verification_source) and include small runner scripts for removing tertiary_email and its source.
Add four standalone Python migration scripts to remove deprecated columns from the prospects table: do_not_call, email_confidence, home_phone, and work_direct_phone. Each script uses get_db_connection_direct to execute an ALTER TABLE ... DROP COLUMN IF EXISTS statement, commits the change, closes the DB connection, and prints a completion message. The DROP COLUMN IF EXISTS makes the scripts safe to run idempotently.
@goldlabelapps goldlabelapps merged commit 2853dad into master Apr 9, 2026
1 check passed
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.

1 participant