PostgreSQL Schema Definition & Migrations - **Label**: `backend`, `infrastructure` - **Description**: Define the core relational model for PrediFi. - **Implementation Hints**: - [ ] Use `sqlx` migrations. - [ ] Tables: `pools` (id, contract_id, state, category, end_time), `predictions` (id, pool_id, user_address, amount, outcome), `stats` (pool_id, total_stake). - [ ] **Security**: Use `Numeric(32, 7)` for amounts to maintain precision. - **Acceptance Criteria**: `cargo sqlx migrate run` successfully creates the schema.
PostgreSQL Schema Definition & Migrations
backend,infrastructuresqlxmigrations.pools(id, contract_id, state, category, end_time),predictions(id, pool_id, user_address, amount, outcome),stats(pool_id, total_stake).Numeric(32, 7)for amounts to maintain precision.cargo sqlx migrate runsuccessfully creates the schema.