monorepo/cloud/maplepress-backend/migrations/013_create_pages_by_site.up.cql

24 lines
696 B
SQL

CREATE TABLE IF NOT EXISTS maplepress.pages_by_site (
site_id UUID,
page_id TEXT,
tenant_id UUID,
title TEXT,
content TEXT,
excerpt TEXT,
url TEXT,
status TEXT,
post_type TEXT,
author TEXT,
published_at TIMESTAMP,
modified_at TIMESTAMP,
indexed_at TIMESTAMP,
meilisearch_doc_id 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 (site_id, page_id)
) WITH CLUSTERING ORDER BY (page_id ASC);