# Clear PocketBase Database - Instructions

## Method 1: Delete Database Files (Recommended - Clean Slate)

1. **Stop PocketBase server** (if running)
   - Press `Ctrl+C` in the terminal where PocketBase is running

2. **Delete database files:**
   ```powershell
   cd c:\Users\hp\Documents\rebrandlyai\html-site\pocketbase\pb_data
   Remove-Item data.db* -Force
   Remove-Item auxiliary.db* -Force
   ```

3. **Restart PocketBase:**
   ```powershell
   cd c:\Users\hp\Documents\rebrandlyai\html-site\pocketbase
   .\pocketbase.exe serve
   ```

4. **Access admin panel:** http://127.0.0.1:8090/_/
   - Create new admin account when prompted
   - Your database is now completely clean!

---

## Method 2: Quick PowerShell Script (Automated)

Run this in PowerShell:

```powershell
# Navigate to pocketbase directory
cd c:\Users\hp\Documents\rebrandlyai\html-site\pocketbase

# Stop PocketBase (if running as background process)
# Get-Process pocketbase -ErrorAction SilentlyContinue | Stop-Process -Force

# Delete database files
Remove-Item pb_data\data.db* -Force -ErrorAction SilentlyContinue
Remove-Item pb_data\auxiliary.db* -Force -ErrorAction SilentlyContinue

Write-Host "✅ Database cleared! Restart PocketBase to create fresh database." -ForegroundColor Green
```

---

## What Gets Deleted:
- ✅ All user accounts
- ✅ All user data (analyses, history, etc.)
- ✅ Admin accounts (you'll need to recreate)

## What Stays:
- ✅ Collection schemas (users, analyses, etc.)
- ✅ PocketBase configuration
- ✅ Your application code

---

## After Clearing:

When you restart PocketBase, it will:
1. Create fresh database files
2. Ask you to create a new admin account
3. Keep all your collection schemas
4. Have zero users registered

You can then test with a clean database!
