"""
Local development overrides.
This file is imported at the end of settings.py and is NOT committed to version control.

Key override: exclude the 'grazuri' legacy app from INSTALLED_APPS.
The grazuri app duplicates db_table names from the loans app
(bureau_records, loan_disbursements, loan_fees, loan_guarantors, loan_statuses),
causing models.E028 system check errors that block every management command.

The grazuri app is only needed for one-time data import scripts — it should
never be active during normal development or production operation.
"""

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.humanize',
    'users',
    'loans',
    'reports',
    'utils',
    'payments',
    'expenses',
    # 'grazuri' intentionally excluded — duplicate db_table conflicts with loans app
]

# Use local DB credentials for development (hardcoded — overrides .env production values)
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'xygbfpsg_loans',
        'USER': 'root',
        'PASSWORD': '',
        'HOST': 'localhost',
        'PORT': '3306',
        'OPTIONS': {
            'init_command': "SET sql_mode='STRICT_TRANS_TABLES'",
            'charset': 'utf8mb4',
        },
    }
}

DEBUG = True
