# Database Migration Scripts - In Order of Execution

## Phase 1: SQLite Schema Updates (Run first)
01_migrate_db.py - Update SQLite schema with all necessary columns and tables

## Phase 2: Data Migration (Run after SQLite updates)
02_migrate_sqlite_to_postgres.py - Migrate data from updated SQLite to PostgreSQL

## Phase 3: PostgreSQL Schema Migrations (Run after data migration)
03_add_dashboard_columns.py - Add missing columns to user_dashboard table
04_add_user_preferences_columns.py - Add missing columns to user_preferences table
05_fix_task_status_enum.py - Fix task status enum values in database
06_add_archived_status.py - Add ARCHIVED status to task_status enum
07_fix_company_work_config_columns.py - Fix company work config column names
08_fix_work_region_enum.py - Fix work region enum values
09_add_germany_to_workregion.py - Add GERMANY back to work_region enum
10_add_company_settings_columns.py - Add missing columns to company_settings table

## Phase 4: Code Migrations (Run after all schema migrations)
11_fix_company_work_config_usage.py - Update code references to CompanyWorkConfig fields
12_fix_task_status_usage.py - Update code references to TaskStatus enum values
13_fix_work_region_usage.py - Update code references to WorkRegion enum values
14_fix_removed_fields.py - Handle removed fields in code
15_repair_user_roles.py - Fix user roles from string to enum values