# Migration Quick Reference Card

## 🚀 **Quick Start Commands**

```bash
# 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)**

```typescript
// 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**

```bash
# 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`
