monorepo/cloud/maplepress-backend/migrations/005_create_tenants_by_status.up.cql

14 lines
463 B
SQL

CREATE TABLE IF NOT EXISTS maplepress.tenants_by_status (
status TEXT,
id UUID,
name TEXT,
slug TEXT,
created_at TIMESTAMP,
updated_at TIMESTAMP,
-- CWE-359: IP address tracking for GDPR compliance (90-day retention)
created_from_ip_address TEXT,
created_from_ip_timestamp TIMESTAMP,
modified_from_ip_address TEXT,
modified_from_ip_timestamp TIMESTAMP,
PRIMARY KEY (status, id)
) WITH CLUSTERING ORDER BY (id ASC);