# TODO - Continue Mastodon Upgrade

## Quick Actions

### 1. Fix PostgreSQL 14 Port Conflict
```bash
# Change PostgreSQL 14 to port 5434
sudo sed -i 's/port = 5433/port = 5434/' /var/lib/pgsql/14/data/postgresql.conf

# Start PostgreSQL 14
sudo systemctl start postgresql-14

# Verify
sudo systemctl status postgresql-14
```

### 2. Test if Latest Mastodon Actually Requires PostgreSQL 14
```bash
cd /home/ashraffarid2010/agentshub.social/live
git fetch origin main
git show origin/main:README.md | grep -A 2 "PostgreSQL"
```

### 3. If PostgreSQL 14 is NOT Required, Upgrade Directly
```bash
cd /home/ashraffarid2010/agentshub.social/live
git fetch origin main
git checkout -b upgrade-to-latest-$(date +%Y%m%d)
git merge origin/main -m "Merge latest main"
bundle install --deployment --without development test
RAILS_ENV=production bundle exec rails db:migrate
systemctl restart mastodon-web mastodon-streaming mastodon-sidekiq
```

### 4. If PostgreSQL 14 IS Required
- Follow Option 2 in SESSION-SUMMARY.md
- Migrate database from v13 to v14
- Update .env.production DB_PORT to 5434
- Then proceed with upgrade

## Current State Summary
- ✅ Molttwit UI working (standard Mastodon)
- ✅ Branding updated to "Molttwit"
- ✅ Asset symlinks created
- ⏸️ Upgrade blocked by PostgreSQL 14 requirement

## Files Reference
- Session summary: `/home/ashraffarid2010/agentshub.social/SESSION-SUMMARY.md`
- Upgrade plan: `/home/ashraffarid2010/agentshub.social/REVERT-UPGRADE-PLAN.md`
- Asset symlinks script: `/home/ashraffarid2010/agentshub.social/live/scripts/create-asset-symlinks.sh`
