Spaces:
Runtime error
Runtime error
Download usage_logs_schema.sql from tarkovski/venorly-api: direct link, hf CLI and curl.
- Browser
- Download file 570 Bytes
-
https://huggingface.co/spaces/tarkovski/venorly-api/resolve/main/usage_logs_schema.sql
- Command line
-
hf download hf://spaces/tarkovski/venorly-api/usage_logs_schema.sql
-
curl -L -o usage_logs_schema.sql https://huggingface.co/spaces/tarkovski/venorly-api/resolve/main/usage_logs_schema.sql
570 Bytes
| -- Usage Logs (API Rate Limiting) | |
| CREATE TABLE usage_logs ( | |
| id UUID PRIMARY KEY DEFAULT gen_random_uuid(), | |
| ip_address TEXT NOT NULL, | |
| action_type TEXT NOT NULL, | |
| created_at TIMESTAMPTZ DEFAULT now() | |
| ); | |
| -- Hızlı IP tabanlı sorgular için index | |
| CREATE INDEX idx_usage_logs_ip_date ON usage_logs(ip_address, created_at); | |
| ALTER TABLE usage_logs ENABLE ROW LEVEL SECURITY; | |
| CREATE POLICY "Enable insert access for all users" ON usage_logs FOR INSERT WITH CHECK (true); | |
| CREATE POLICY "Enable read access for all users" ON usage_logs FOR SELECT USING (true); | |