files

-1 rows


Description

Generic information about individual files. Files are associated with application entities using linking tables such as accession_photos.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
id int8 19 √ null
activity_media_files.file_id activity_media_files_file_id_fkey C
report_photos.file_id report_photos_file_id_fkey C
submission_snapshots.file_id submission_snapshots_file_id_fkey C
variable_image_values.file_id variable_image_values_file_id_fkey R
published_activity_media_files.file_id published_activity_media_files_file_id_fkey R
published_activity_observation_media_files.file_id published_activity_observation_media_files_file_id_fkey R
published_report_photos.file_id published_report_photos_file_id_fkey C
batch_photos.file_id batch_photos_file_id_fkey N
withdrawal_photos.file_id withdrawal_photos_photo_id_fkey R
birdnet_results.file_id birdnet_results_file_id_fkey R
file_access_tokens.file_id file_access_tokens_file_id_fkey C
mux_assets.file_id mux_assets_file_id_fkey R
organization_media_files.file_id organization_media_files_file_id_fkey C
seed_fund_report_files.file_id report_files_file_id_fkey C
seed_fund_report_photos.file_id report_photos_photo_id_fkey C
splat_additional_files.file_id splat_additional_files_file_id_fkey C
splat_annotation_media.file_id splat_annotation_media_file_id_fkey C
splat_annotations.file_id splat_annotations_file_id_fkey R
splats.file_id splats_file_id_fkey R
thumbnails.file_id thumbnail_photo_id_fkey R
accession_photos.file_id accession_photos_photo_id_fkey R
observation_media_files.file_id observation_photos_file_id_fkey C
file_name text 2147483647 null
content_type text 2147483647 null
size int8 19 null
created_time timestamptz 35,6 null
modified_time timestamptz 35,6 null
created_by int8 19 √ null
users.id photos_user_id_fkey R
storage_url text 2147483647 null
modified_by int8 19 null
users.id photos_modified_by_fkey R
captured_local_time timestamp 29,6 √ null

If applicable, the date and time in the local time zone of wherever the file’s data was captured. For example, the time a photo was taken. This may differ from created_time, which represents when the file was stored in Terraware. This is typically extracted from the file itself, e.g., EXIF metadata.

geolocation geometry 2147483647 √ null

If applicable, the location where the file was created. For photos, typically extracted from EXIF metadata.

file_batch_id int8 19 √ null
file_batches.id files_file_batch_id_fkey N

If this file was uploaded as part of a batch, the ID of the batch.

Indexes

Constraint Name Type Sort Column(s)
photos_pkey Primary key Asc id
files_file_batch_id_idx Performance Asc file_batch_id
photos_storage_url_key Must be unique Asc storage_url

Check Constraints

Constraint Name Constraint
content_type_cannot_be_empty_string (length(content_type) > 0)
file_name_cannot_be_empty_string (length(file_name) > 0)

Relationships