Initial commit: Open sourcing all of the Maple Open Technologies code.
This commit is contained in:
commit
755d54a99d
2010 changed files with 448675 additions and 0 deletions
|
|
@ -0,0 +1,43 @@
|
|||
-- Query files by user_id (owner OR member), ordered by most recently modified first
|
||||
CREATE TABLE maplefile.files_by_user (
|
||||
user_id UUID,
|
||||
modified_at TIMESTAMP,
|
||||
id UUID,
|
||||
owner_id UUID,
|
||||
collection_id UUID,
|
||||
created_by_user_id UUID,
|
||||
state TEXT,
|
||||
|
||||
-- Encryption and Content Details
|
||||
encrypted_metadata TEXT,
|
||||
encrypted_file_key TEXT,
|
||||
encryption_version TEXT,
|
||||
encrypted_hash TEXT,
|
||||
|
||||
-- File Storage Details
|
||||
encrypted_file_object_key TEXT,
|
||||
encrypted_file_size_in_bytes BIGINT,
|
||||
|
||||
-- Thumbnail Storage Details
|
||||
encrypted_thumbnail_object_key TEXT,
|
||||
encrypted_thumbnail_size_in_bytes BIGINT,
|
||||
|
||||
-- Embedded tags (full tag data as JSON)
|
||||
tags TEXT,
|
||||
|
||||
-- Timestamps and versioning
|
||||
created_at TIMESTAMP,
|
||||
modified_by_user_id UUID,
|
||||
version BIGINT,
|
||||
|
||||
-- State management
|
||||
tombstone_version BIGINT,
|
||||
tombstone_expiry TIMESTAMP,
|
||||
|
||||
-- IP tracking for GDPR compliance
|
||||
created_from_ip_address TEXT,
|
||||
modified_from_ip_address TEXT,
|
||||
ip_anonymized_at TIMESTAMP,
|
||||
|
||||
PRIMARY KEY (user_id, modified_at, id)
|
||||
) WITH CLUSTERING ORDER BY (modified_at DESC, id ASC);
|
||||
Loading…
Add table
Add a link
Reference in a new issue