Files
crowd-funder-for-time-pwa/doc/migration-quick-reference.md
Matthew Raymer 64e78fdbce Finalize Dexie-to-SQLite migration prep: docs, circular dep removal, SQL helpers, tests
- Removed all vestigial Dexie/USE_DEXIE_DB references from code and docs
- Centralized DB logic in PlatformServiceMixin; resolved logger/databaseUtil circular dependency
- Modularized SQL helpers (`$generateInsertStatement`, `$generateUpdateStatement`) and added unit tests
- Created/updated migration tracking docs and helper script for cross-machine progress
- Confirmed all lint/type checks and tests pass; ready for systematic file migration
2025-07-06 09:44:20 +00:00

2.3 KiB

Migration Quick Reference Card

🚀 Quick Start Commands

# Check current progress
./scripts/migration-helper.sh progress

# See what files need migration
./scripts/migration-helper.sh files

# Get migration patterns
./scripts/migration-helper.sh patterns

# Validate current state
./scripts/migration-helper.sh validate

📊 Current Status

  • Total Files: 52
  • Migrated: 0
  • Progress: 0%
  • Current Phase: Day 1 - PlatformServiceMixin Completion

🔄 Migration Pattern (Copy-Paste Template)

// 1. Add import
import { PlatformServiceMixin } from "@/utils/PlatformServiceMixin";

// 2. Add to component
export default class ComponentName extends Vue {
  mixins = [PlatformServiceMixin];
  
  // 3. Replace method calls
  async someMethod() {
    // Before: generateInsertStatement(contact, 'contacts')
    // After:  this.$generateInsertStatement(contact, 'contacts')
  }
}

📝 Common Replacements

Old New
generateInsertStatement this.$generateInsertStatement
generateUpdateStatement this.$generateUpdateStatement
parseJsonField this._parseJsonField
mapColumnsToValues this._mapColumnsToValues
logToDb this.$log
logConsoleAndDb this.$logAndConsole
memoryLogs this.$memoryLogs

🎯 Priority Order

  1. Views (25 files) - User-facing components
  2. Components (15 files) - Reusable UI components
  3. Services (8 files) - Business logic
  4. Utils (4 files) - Utility functions

Validation Checklist

After each file migration:

  • No databaseUtil imports
  • PlatformServiceMixin added
  • Method calls updated
  • Linting passes
  • TypeScript compiles

📋 Key Files to Track

  • Progress Tracker: doc/migration-progress-tracker.md
  • Completion Plan: doc/platformservicemixin-completion-plan.md
  • Helper Script: scripts/migration-helper.sh

🆘 Quick Help

# Show all migration info
./scripts/migration-helper.sh all

# Count remaining files
find src -name "*.vue" -o -name "*.ts" | xargs grep -l "import.*databaseUtil" | wc -l

# Run validation
npm run lint && npx tsc --noEmit

Last Updated: $(date) Full Documentation: doc/migration-progress-tracker.md