Commit graph

2 commits

Author SHA1 Message Date
DJP
5f6d24c550 Fix timestamp bug in campaign status recording
- Fixed database.py line 479: Changed 'CURRENT_TIMESTAMP' string to actual datetime
- Added datetime import for proper UTC timestamp generation
- This fixes the PostgreSQL error: invalid input syntax for type timestamp
- Added migration file for campaign_status table

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-05 16:34:46 -05:00
DJP
d4debbe3da Add complete deployment guide and database init.sql
Production-ready deployment package with database schema and server setup guide.

NEW FILES:
1. DEPLOYMENT_GUIDE.md - Complete server deployment instructions
2. database/init.sql - PostgreSQL database initialization script

DEPLOYMENT_GUIDE.md includes:
✓ Server deployment steps (rsync/scp)
✓ PostgreSQL setup (Docker or native)
✓ Python environment setup
✓ Configuration guide
✓ Cron job examples
✓ OAuth2 vs mTLS setup instructions
✓ Testing checklist
✓ Troubleshooting guide
✓ Production checklist
✓ Security hardening steps

database/init.sql includes:
✓ Complete schema with all 35 columns in master_assets
✓ All 4 tables (master_assets, derivative_assets, asset_events, workflow_state)
✓ Campaign relationship fields (global_master_campaign_id, global_master_folder_id, local_campaign_id)
✓ JSONB full_metadata column
✓ 12 indexes for performance
✓ 4 triggers (auto-update timestamps, event logging)
✓ 2 helper functions
✓ Proper permissions for ferrero_user

KEY FEATURES:
- Self-contained deployment
- Works with Docker or native PostgreSQL
- Includes all schema additions from this session
- OAuth2 and mTLS configuration documented
- Cron job templates provided
- Security checklist included

DEPLOYMENT:
1. Copy Python-Version/ folder to server
2. Run database init.sql
3. Install Python dependencies
4. Update .env for server
5. Test connections
6. Set up cron jobs

Everything needed for production deployment is included.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-05 09:27:25 -05:00