# Steps to Rename status to propertyStatus

## Step 1: Rename Database Column FIRST (IMPORTANT!)

Run this SQL command in your PostgreSQL database:

```sql
-- Rename the column
ALTER TABLE properties RENAME COLUMN status TO "propertyStatus";

-- Update any invalid values
UPDATE properties 
SET "propertyStatus" = 'upcoming' 
WHERE "propertyStatus" NOT IN ('upcoming', 'ongoing', 'completed') 
   OR "propertyStatus" IS NULL;
```

## Step 2: After Database Migration

1. Update schema.json - change `status` to `propertyStatus`
2. Rebuild Strapi: `npm run build`
3. Restart Strapi: `pm2 restart nrel-cms`

## Why This Order?

- Database column must exist BEFORE Strapi tries to use it
- Schema defines what Strapi expects
- If schema says `propertyStatus` but DB has `status`, it will fail

