Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- Migration: Remove primary_email_verification_source column from prospects table
ALTER TABLE prospects DROP COLUMN IF EXISTS primary_email_verification_source;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- Migration: Rename corporate_phone column to phone in prospects table
ALTER TABLE prospects RENAME COLUMN corporate_phone TO phone;
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import os
import sys
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '../../../..')))
from app.utils.db import get_db_connection_direct

if __name__ == "__main__":
sql = "ALTER TABLE prospects DROP COLUMN IF EXISTS primary_email_verification_source;"
conn = get_db_connection_direct()
cur = conn.cursor()
cur.execute(sql)
conn.commit()
cur.close()
conn.close()
print("Migration complete: primary_email_verification_source column dropped from prospects table.")
14 changes: 14 additions & 0 deletions app/api/prospects/sql/run_alter_rename_corporate_phone_to_phone.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import os
import sys
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '../../../..')))
from app.utils.db import get_db_connection_direct

if __name__ == "__main__":
sql = "ALTER TABLE prospects RENAME COLUMN corporate_phone TO phone;"
conn = get_db_connection_direct()
cur = conn.cursor()
cur.execute(sql)
conn.commit()
cur.close()
conn.close()
print("Migration complete: corporate_phone column renamed to phone in prospects table.")
Loading