Commit Graph

8 Commits

Author SHA1 Message Date
Adrian Flores Cortes
e4d39b1293 [Sprint-2] feat: Add Feature Flags schema
Created feature_flags schema with:
- flags table: Global feature flag definitions
- user_flags table: User-level overrides
- evaluations table: Evaluation history for analytics
- evaluate_flag() function: PL/pgSQL evaluation with priorities

Features:
- Percentage-based rollout
- User override support
- Targeting rules (plan, role)
- Expiration support
- Initial flags for trading platform

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 15:38:38 -06:00
Adrian Flores Cortes
2a6d8367d8 feat: Update DDL schemas and add new structures
DDL updates:
- Update extensions and schemas configuration
- Add sessions table for auth schema
- Update education schema (videos, install/uninstall scripts)
- Add backtest_runs and llm_signals tables for ML schema

Scripts:
- Update database creation and migration scripts
- Add DDL validation script

New:
- Add migrations directory structure
- Add production seeds for auth, investment, market_data, trading

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 12:24:23 -06:00
Adrian Flores Cortes
70c201da8e feat: Add review_helpful_votes table (OQI-002)
Created table to track user votes on course reviews:
- education.review_helpful_votes
- Constraint: one vote per user per review
- Indexes on user_id and review_id

This table supports the "mark as helpful" feature in course reviews.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 12:40:21 -06:00
Adrian Flores Cortes
551091d26a feat(database): Add GBPJPY ticker to market_data seed data
- Add GBPJPY (GBP/JPY, forex, C:GBPJPY) to tickers seed
- Now 7 tickers: XAUUSD, EURUSD, BTCUSD, GBPUSD, USDJPY, AUDUSD, GBPJPY

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 04:39:41 -06:00
Adrian Flores Cortes
3f7816d4ec feat(database): Add videos table for education module (ST4.3.1)
Table: education.videos

Features:
- Multipart upload tracking (upload_id, parts, progress)
- Storage integration (S3/R2/Cloudflare Stream)
- Video processing status (uploading → processing → ready)
- Transcoded versions JSONB (multiple resolutions)
- CDN URLs (video + thumbnail)
- Metadata JSONB (tags, language, difficulty, captions, transcript)
- Soft delete (deleted_at)
- GIN index for metadata search
- Helper functions (soft_delete_video)
- View for active videos

Constraints:
- Valid status enum
- Valid storage provider enum
- Positive file size & duration
- Progress 0-100%

Blocker: BLOCKER-003 (ST4.3 Video Upload Backend)
Epic: OQI-002

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 20:06:10 -06:00
Adrian Flores Cortes
3fbb1c21e6 [OQI-008] feat: Add portfolio DDL schema with tables for portfolios, allocations, goals
- Added portfolio schema to 01-schemas.sql
- Created enums: risk_profile, goal_status, rebalance_action, allocation_status
- Created tables: portfolios, portfolio_allocations, portfolio_goals
- Created tables: rebalance_history, portfolio_snapshots
- Added triggers for updated_at and goal progress calculations
- Added indexes for performance

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 08:20:48 -06:00
Adrian Flores Cortes
439489bde4 feat: Add DDL tables for notifications system
- Add auth.notifications table for storing user notifications
- Add auth.user_push_tokens table for FCM/APNs tokens
- Add investment.distribution_history for daily distribution records
- Add investment.distribution_runs for job execution logs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 03:48:28 -06:00
45e77e9a9c feat: Initial commit - Database schemas and scripts
DDL schemas for Trading Platform:
- User management
- Authentication
- Payments
- Education
- ML predictions
- Trading data

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 04:30:23 -06:00