Schema: drive
Part of the generated database reference.
drive_files
- Domain:
drive Β· Feature gate: #[cfg(feature = "cloud")] Β· Migration: 6.5.25-drive-files-drop-bot-id
- Rust source:
botschema/src/drive.rs
| Column |
SQL type |
Null |
Default |
Key |
References |
| id |
UUID |
no |
gen_random_uuid() |
PK |
β |
| file_path |
TEXT |
no |
β |
β |
β |
| file_type |
VARCHAR(255) |
no |
β |
β |
β |
| etag |
TEXT |
yes |
β |
β |
β |
| last_modified |
TIMESTAMPTZ |
yes |
β |
β |
β |
| file_size |
BIGINT |
yes |
β |
β |
β |
| indexed |
BOOLEAN |
no |
FALSE |
β |
β |
| fail_count |
INTEGER |
no |
0 |
β |
β |
| last_failed_at |
TIMESTAMPTZ |
yes |
β |
β |
β |
| created_at |
TIMESTAMPTZ |
no |
NOW() |
β |
β |
| updated_at |
TIMESTAMPTZ |
no |
NOW() |
β |
β |
| user_id |
UUID |
yes |
β |
β |
β |
| scope |
VARCHAR(20) |
yes |
'global' |
β |
β |
| branch_id |
UUID |
yes |
β |
FK |
branches.id |
| path |
TEXT |
yes |
β |
β |
β |
| name |
TEXT |
yes |
β |
β |
β |
| mime_type |
VARCHAR(50) |
yes |
β |
β |
β |
Indexes: idx_unified_search_drive_files(to_tsvector('english', COALESCE(name::text, '')
Drift: in migrations only: bot_id
drive_share_links
- Domain:
drive Β· Feature gate: #[cfg(feature = "cloud")] Β· Migration: 6.5.15.1-consolidated
- Rust source:
botschema/src/drive.rs
| Column |
SQL type |
Null |
Default |
Key |
References |
| id |
UUID |
no |
gen_random_uuid() |
PK |
β |
| created_by |
UUID |
no |
β |
β |
β |
| bucket |
VARCHAR(255) |
no |
β |
β |
β |
| path |
TEXT |
no |
β |
β |
β |
| token |
VARCHAR(255) |
no |
β |
UQ |
β |
| permission |
VARCHAR(255) |
no |
'read' |
β |
β |
| expires_at |
TIMESTAMPTZ |
yes |
β |
β |
β |
| max_downloads |
INTEGER |
yes |
β |
β |
β |
| download_count |
INTEGER |
no |
0 |
β |
β |
| created_at |
TIMESTAMPTZ |
no |
NOW() |
β |
β |
drive_starred
- Domain:
drive Β· Feature gate: #[cfg(feature = "cloud")] Β· Migration: 6.5.15.1-consolidated
- Rust source:
botschema/src/drive.rs
| Column |
SQL type |
Null |
Default |
Key |
References |
| id |
UUID |
no |
gen_random_uuid() |
PK |
β |
| user_id |
UUID |
no |
β |
β |
β |
| bucket |
VARCHAR(255) |
no |
β |
β |
β |
| path |
TEXT |
no |
β |
β |
β |
| created_at |
TIMESTAMPTZ |
no |
NOW() |
β |
β |
drive_user_permissions
- Domain:
drive Β· Feature gate: #[cfg(feature = "cloud")] Β· Migration: 6.5.15.1-consolidated
- Rust source:
botschema/src/drive.rs
| Column |
SQL type |
Null |
Default |
Key |
References |
| id |
UUID |
no |
gen_random_uuid() |
PK |
β |
| user_id |
UUID |
no |
β |
β |
β |
| bucket |
VARCHAR(255) |
no |
β |
β |
β |
| path |
TEXT |
no |
β |
β |
β |
| permission |
VARCHAR(255) |
no |
'read' |
β |
β |
| granted_by |
UUID |
yes |
β |
β |
β |
| created_at |
TIMESTAMPTZ |
no |
NOW() |
β |
β |
| expires_at |
TIMESTAMPTZ |
yes |
β |
β |
β |