-- İçerik sürümleri (geri alma / denetim için anlık görüntü; panel UI aşamalı eklenebilir).

CREATE TABLE IF NOT EXISTS content_revisions (
  id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
  entity_type VARCHAR(64) NOT NULL,
  entity_id BIGINT UNSIGNED NOT NULL,
  admin_user_id INT UNSIGNED NOT NULL,
  label VARCHAR(255) NOT NULL DEFAULT '',
  snapshot_json JSON NOT NULL,
  created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (id),
  KEY idx_content_revisions_entity (entity_type, entity_id),
  KEY idx_content_revisions_created (created_at)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
