CREATE TABLE depot_objects (
    id TEXT PRIMARY KEY,
    name VARCHAR(255) NOT NULL,
    content_type VARCHAR(255) NOT NULL,
    content_length BIGINT NOT NULL,
    bucket_name VARCHAR(255) NOT NULL,
    object_key TEXT NOT NULL,
    contains_content BOOLEAN NOT NULL DEFAULT FALSE,
    created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

CREATE INDEX idx_depot_objects_orphaned
ON depot_objects(created_at) WHERE contains_content = FALSE;
