196b543bee
CI / build-and-test (push) Successful in 1m47s
* Implement tenant and user creation in IdentityPage * Add API calls for managing tenants and users * Introduce tenant-scoped API requests * Update sidebar to include identity navigation * Create BooleanStatusBadge component for key status
28 lines
790 B
Plaintext
28 lines
790 B
Plaintext
Table stored_files {
|
|
id bigserial [pk]
|
|
guid uuid [unique, not null, default: `gen_random_uuid()`]
|
|
thought_id bigint [ref: > thoughts.id]
|
|
project_id bigint [ref: > projects.id]
|
|
tenant_id text [ref: > tenants.id]
|
|
name text [not null]
|
|
media_type text [not null]
|
|
kind text [not null, default: 'file']
|
|
encoding text [not null, default: 'base64']
|
|
size_bytes bigint [not null]
|
|
sha256 text [not null]
|
|
content bytea [not null]
|
|
created_at timestamptz [not null, default: `now()`]
|
|
updated_at timestamptz [not null, default: `now()`]
|
|
|
|
indexes {
|
|
thought_id
|
|
project_id
|
|
tenant_id
|
|
sha256
|
|
}
|
|
}
|
|
|
|
// Cross-file refs (for relspecgo merge)
|
|
Ref: stored_files.thought_id > thoughts.id [delete: set null]
|
|
Ref: stored_files.project_id > projects.id [delete: set null]
|