ultisuite-backend/migrations/000037_drive_org_folders_mounts.up.sql
R3D347HR4Y 1d063237b9
Some checks are pending
CI / Go tests (push) Waiting to run
CI / Integration tests (push) Waiting to run
CI / DB migrations (push) Waiting to run
feat(transcription): integrate Faster Whisper for Jitsi transcriptions
- Added support for Faster Whisper transcription via Jigasi and Skynet.
- Updated .env.example to include new environment variables for transcription settings.
- Enhanced Jitsi Docker Compose configuration to include Skynet and Jigasi services.
- Introduced new API endpoints for managing organizational folders in the drive service.
- Updated Nextcloud initialization script to enable external file mounting.
- Improved error handling and response structures in the drive API.
- Added new properties for organization settings related to transcription and agenda management.
2026-06-12 19:10:18 +02:00

39 lines
1.5 KiB
SQL

CREATE TABLE drive_org_folders (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
org_slug TEXT NOT NULL,
nc_folder_id INTEGER NOT NULL,
mount_point TEXT NOT NULL,
quota_bytes BIGINT,
auto_provisioned BOOLEAN NOT NULL DEFAULT false,
created_by TEXT NOT NULL DEFAULT '',
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
CONSTRAINT drive_org_folders_org_slug_uniq UNIQUE (org_slug),
CONSTRAINT drive_org_folders_nc_folder_id_uniq UNIQUE (nc_folder_id)
);
CREATE INDEX idx_drive_org_folders_org_slug ON drive_org_folders (org_slug);
CREATE TABLE drive_mounts (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
scope TEXT NOT NULL CHECK (scope IN ('user', 'org')),
owner_user_id UUID REFERENCES users(id) ON DELETE CASCADE,
org_slug TEXT,
nc_mount_id INTEGER,
display_name TEXT NOT NULL,
backend_type TEXT NOT NULL,
mount_point TEXT NOT NULL,
status TEXT NOT NULL DEFAULT 'active' CHECK (status IN ('active', 'error', 'pending')),
last_error TEXT NOT NULL DEFAULT '',
config_encrypted BYTEA,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
CONSTRAINT drive_mounts_scope_owner_chk CHECK (
(scope = 'user' AND owner_user_id IS NOT NULL)
OR (scope = 'org' AND org_slug IS NOT NULL AND org_slug <> '')
)
);
CREATE INDEX idx_drive_mounts_owner ON drive_mounts (owner_user_id) WHERE scope = 'user';
CREATE INDEX idx_drive_mounts_org ON drive_mounts (org_slug) WHERE scope = 'org';