Initial Commit of the PDM project (ready for DWS migration)

This commit is contained in:
will
2026-04-20 08:42:38 -05:00
commit dda7b664e7
2721 changed files with 442772 additions and 0 deletions

65
check_paths.py Normal file
View File

@@ -0,0 +1,65 @@
"""Quick diagnostic script to check sample paths in both databases."""
import json
from db_utils import DatabaseConnection
# Load configuration
with open('config.json', 'r') as f:
config = json.load(f)
# Connect to databases
print("Connecting to source database...")
source_conn = DatabaseConnection(config['source_db'])
print("Connecting to target database...")
target_conn = DatabaseConnection(config['target_db'])
# Get sample paths from source
print("\n" + "="*50)
print("SAMPLE PATHS FROM SOURCE (_Citadel_CS_Test)")
print("="*50)
source_samples = source_conn.execute_query("""
SELECT TOP 10
d.DocumentID,
d.Filename,
p.Path AS FolderPath,
p.Path + '\\' + d.Filename AS FullVaultPath
FROM Documents d
INNER JOIN DocumentsInProjects dp ON d.DocumentID = dp.DocumentID
INNER JOIN Projects p ON dp.ProjectID = p.ProjectID
ORDER BY d.DocumentID
""")
for doc in source_samples:
print(f"DocID: {doc['DocumentID']}")
print(f" Filename: {doc['Filename']}")
print(f" FolderPath: [{doc['FolderPath']}]")
print(f" FullVaultPath: [{doc['FullVaultPath']}]")
print()
# Get sample paths from target
print("\n" + "="*50)
print("SAMPLE PATHS FROM TARGET (IDSVault_Test)")
print("="*50)
target_samples = target_conn.execute_query("""
SELECT TOP 10
d.DocumentID,
d.Filename,
p.Path AS FolderPath,
p.Path + '\\' + d.Filename AS FullVaultPath
FROM Documents d
INNER JOIN DocumentsInProjects dp ON d.DocumentID = dp.DocumentID
INNER JOIN Projects p ON dp.ProjectID = p.ProjectID
ORDER BY d.DocumentID
""")
for doc in target_samples:
print(f"DocID: {doc['DocumentID']}")
print(f" Filename: {doc['Filename']}")
print(f" FolderPath: [{doc['FolderPath']}]")
print(f" FullVaultPath: [{doc['FullVaultPath']}]")
print()
# Close connections
source_conn.close()
target_conn.close()