-- NS-17: authoritative player position (column layout; player_id is normalized in app: lower(trim(raw))).
CREATE TABLE IF NOT EXISTS player_position (
    player_id TEXT PRIMARY KEY,
    pos_x DOUBLE PRECISION NOT NULL,
    pos_y DOUBLE PRECISION NOT NULL,
    pos_z DOUBLE PRECISION NOT NULL,
    sequence BIGINT NOT NULL DEFAULT 0,
    updated_at TIMESTAMPTZ NOT NULL DEFAULT now()
);

COMMENT ON TABLE player_position IS 'Persisted PositionSnapshot per player (NS-17).';
