- 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.
39 lines
1.5 KiB
SQL
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';
|