# Legacy Dexie Database — Migration Guidelines

> **Agent role**: Reference this file when working with legacy Dexie
> database code or migration patterns.

## Overview

All references in the codebase to Dexie apply only to migration from
IndexedDb to Absurd SQL. Dexie is no longer used for new development.

## Migration Status

- **Legacy Code**: Existing Dexie implementations being migrated
- **Target**: Absurd SQL with IndexedDB backend
- **Timeline**: Gradual migration as features are updated

## Key Principles

- **No New Dexie**: All new database operations use Absurd SQL
- **Migration Path**: Legacy code should be migrated when updated
- **Backward Compatibility**: Maintain existing functionality during
  migration

## Integration Points

- Apply these rules when updating database-related code
- Use during feature development and refactoring
- Include in database architecture decisions

---

**Status**: Legacy migration guidelines
**Priority**: Low
**Estimated Effort**: Ongoing reference
**Dependencies**: absurd-sql.mdc
**Stakeholders**: Database team, Development team

All references in the codebase to Dexie apply only to migration from IndexedDb
to Sqlite and will be deprecated in future versions.

## Model Implementation Checklist

### Before Legacy Dexie Work

- [ ] **Migration Analysis**: Identify legacy Dexie code that needs migration
- [ ] **Target Planning**: Plan migration to Absurd SQL with IndexedDB backend
- [ ] **Backward Compatibility**: Plan to maintain existing functionality
- [ ] **Testing Strategy**: Plan testing approach for migration

### During Legacy Dexie Migration

- [ ] **No New Dexie**: Ensure no new Dexie code is introduced
- [ ] **Migration Implementation**: Implement migration to Absurd SQL
- [ ] **Functionality Preservation**: Maintain existing functionality during migration
- [ ] **Error Handling**: Implement proper error handling for migration

### After Legacy Dexie Migration

- [ ] **Functionality Testing**: Verify all functionality still works correctly
- [ ] **Performance Validation**: Ensure performance meets or exceeds legacy
- [ ] **Documentation Update**: Update database documentation
- [ ] **Legacy Cleanup**: Remove deprecated Dexie code
