# Update Database Primary Key Definition

## Summary
Updated the database schema initialization script to define a composite primary key `(ts_ms, guid)` instead of a single primary key on `guid`, aligning with the project documentation requirements.

## Changes

### 1. Database Schema (`scripts/init_db.sql`)
- **Primary Key**: Changed from `guid` to composite `(ts_ms, guid)`.
  - **Reasoning**: `ts_ms` is the partition key or main ordering field (Key1), and `guid` provides uniqueness (Key2). This structure optimizes time-series based queries and data distribution.
- **Indexes**: Removed `idx_rcu_action_ts_ms` as it is now redundant (covered by the primary key index).

## Impact
- **Table Structure**: `rcu_action.rcu_action_events` now enforces uniqueness on the combination of timestamp and GUID.
- **Performance**: Queries filtering by `ts_ms` will utilize the primary key index.

## Verification
- Reviewed SQL syntax in `scripts/init_db.sql`.
- Confirmed alignment with `docs/readme.md` requirements.
