This commit is contained in:
2025-11-02 09:31:01 +01:00
commit 455e144ffb
37 changed files with 4193 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
CREATE TABLE media (
id UUID PRIMARY KEY,
owner_id UUID NOT NULL REFERENCES users(id),
storage_path TEXT NOT NULL,
original_filename TEXT NOT NULL,
mime_type TEXT NOT NULL,
hash TEXT NOT NULL UNIQUE, -- For duplicate checking
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
-- Optional fields from the model
extracted_location TEXT, width INTEGER, height INTEGER );
-- Indexes for faster lookups
CREATE INDEX idx_media_owner_id ON media (owner_id);
CREATE INDEX idx_media_hash ON media (hash);