Database Migrations

🗄️ Database Migrations

Manage database schema changes across all agency databases

⚠️ Important Safety Guidelines:
  • Always backup databases before running migrations
  • Test in development environment first
  • Use preview mode to verify SQL before executing
  • Run during off-hours when possible to minimize impact
  • Have rollback plan ready if issues occur
🚀 Available Migrations
🔧 Generic Column Creator
Universal tool to add any column to any table across all agency databases. Features form-based interface with preview mode and validation.
✨ Most Flexible | 📝 Form-Based | 🔍 SQL Preview
Use Generic Tool →
💰 Adjust Contract Balance Field
Adds adjust_contract_balance column to Visits_payments for tracking whether write-off amounts should be included in contract balance calculations for AR reporting.
📅 New | 📋 Table: Visits_payments | 💼 Billing Feature
Run Migration →
⚕️ Unstable Action Field
Adds unstable_action column to pSchedules for tracking clinician actions when handling unstable patient vitals/symptoms.
📅 Created: 2024-12-03 | 📋 Table: pSchedules
Run Migration →
🩹 Wound Tunneling & Undermining
Adds wnd_tunneling and wnd_underm columns to pWoundsVitals and pProgress tables for tracking wound characteristics.
📅 New | 📋 Tables: pWoundsVitals, pProgress | 🔢 2 Columns Each
Run Migration →
🩹 Wound Assessment Fields
Adds wnd_gran, wnd_epith, wnd_eschar, wnd_slough, and wnd_fib columns to pWoundsVitals and pProgress tables for comprehensive wound assessment tracking.
📅 New | 📋 Tables: pWoundsVitals, pProgress | 🔢 5 Columns Each
Run Migration →
📋 EVV Reason Codes Setup
Creates EVV_Reason_Codes and EVV_Update_Log tables. Adds EVV_Reason_Code_ID to pSchedules for tracking visit update reasons.
📅 Previously Run | 📋 Tables: Multiple
View/Run →
📄 Document Expiration Date
Adds date_expire field to document description tables for tracking document expiration dates.
📅 Previously Available | 📋 Table: DocumentDesc
View/Run →
📋 Communication Certification Period
Adds certification period columns to Communication table for storing CTI (Physician Certification of Terminal Illness) certification period information.
📅 New | 📋 Table: Communication | 🔢 3 Columns
View/Run →
📝 Communication Subjects (CTI & Face to Face)
Adds "Physician Certification of Terminal Illness" and "Face to Face Encounter" subjects to CommunicationSubjects table for all agencies.
📅 New | 📋 Table: CommunicationSubjects | 🔢 2 Subjects
View/Run →
📍 Communication Encounter Location
Adds Encounter_Location column to Communication table for storing location information in Face to Face Encounter communications.
📅 New | 📋 Table: Communication | 🔢 1 Column
View/Run →
📋 Copy SN Evaluation to Palliative
Copies all assessment questions and answers from 'SN Evaluation' to 'Palliative' in the lookup database. Issue #9907.
📅 New | 📋 Tables: assessment_questions_lookup, assessment_answers_lookup | 🔄 Data Copy
Run Migration →
EVV Auto-Status Triggers
Updates database triggers to automatically set "Data Changed - Retransmission Required" status when EVV data is modified.
📅 Previously Available | 🔄 Trigger Updates
View/Run →
👤 Employee Auth QA Fields
Adds quality assurance fields to employee authorization tracking system.
📅 Previously Available | 📋 Table: Employee Auth
View/Run →
📚 Documentation & Tools

Migration Best Practices:

  1. Read Documentation: Check README files for each migration
  2. Backup First: Always backup databases before schema changes
  3. Test in Dev: Run migrations in development before production
  4. Use Preview: Most tools offer SQL preview mode
  5. Monitor Progress: Watch for errors during execution
  6. Verify Results: Check at least one agency database after migration
  7. Document Changes: Update documentation when creating new migrations
🔗 Quick Access
💡 Need to Create a New Migration?
  1. Use the Generic Column Tool for simple column additions
  2. For complex migrations, copy an existing migration file as template
  3. Add your migration case to database_migration.cfm
  4. Document your migration with a README file
  5. Test thoroughly before running on production

Migration System | PowerPath EMR | Version 2.0
Last Updated: December 2024