# files_reference

0 rows

### Description

Store files references

### Columns

Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments
--- | --- | --- | --- | --- | --- | --- | --- | ---
id | BIGINT | 19 |  | √ | null |
files.referencefileid | file_ref2_fkR
repositoryid | BIGINT | 19 |  |  | null |  |
repository_instances.id | filerefe_rep2_fkR
lastsync | BIGINT | 19 | √ |  | null |  |  | Last time the proxy file was synced with repository
reference | LONGTEXT | 2147483647 | √ |  | null |  |  | Identification of the external file. Repository plugins are interpreting it to locate the external file.
referencehash | VARCHAR | 40 |  |  |  |  |  | Internal implementation detail, contains SHA1 hash of the reference field. Can be indexed and used for comparison. Not meant to be used by a non-core code.

### Indexes

Constraint Name | Type | Sort | Column(s)
--- | --- | --- | ---
PRIMARY | Primary key | Asc | id
filerefe_refrep_uix | Must be unique | Asc/Asc | referencehash + repositoryid
filerefe_rep_ix | Performance | Asc | repositoryid

### Relationships